EmptySelectionBoxTemplate when IsEditable

3 posts, 0 answers
  1. Mike Wishart
    Mike Wishart avatar
    7 posts
    Member since:
    Feb 2010

    Posted 04 Jun 2010 Link to this post

    The RadComboBox doesn't seem to use the EmptySelectionBoxTemplate when IsEditable = true.  Is it supposed to, or is there another template to use?

    <telerik:RadComboBox EmptyText="Select an answer"
                     IsEditable="True"
                     ItemsSource="{Binding Answers}">
        <telerik:RadComboBox.EmptySelectionBoxTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding}" FontStyle="Italic" Foreground="Red" Opacity="0.4"/>
            </DataTemplate>
        </telerik:RadComboBox.EmptySelectionBoxTemplate>
    </telerik:RadComboBox>

    Thanks
  2. Mike Wishart
    Mike Wishart avatar
    7 posts
    Member since:
    Feb 2010

    Posted 04 Jun 2010 Link to this post

    PS. I know this is mentioned in the documentation.  I'm setting a custom watermark using Background and a VisualBrush when the RadComboBox is editable.  It just seems a little odd that the template doesn't work.

    Thanks again.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 07 Jun 2010 Link to this post

    Hi Mike,

    You are right about the EmptySelectionBoxTemplate. Since in editable mode RadComboBox can display only text, its control template does not contain the ContentPresenter, that displays EmptySelectionBoxTemplate in not editable mode. Probably we should thrown an exception when you have both EmptySelectionBoxTemplate and IsEditable=true, the same way like we throw when you set both DisplayMemberPath and ItemTemplate.

    All the best,
    Valeri Hristov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top