This is a migrated thread and some comments may be shown as answers.

EmptySelectionBoxTemplate when IsEditable

2 Answers 72 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mike Wishart
Top achievements
Rank 1
Mike Wishart asked on 05 Jun 2010, 12:46 AM
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 Answers, 1 is accepted

Sort by
0
Mike Wishart
Top achievements
Rank 1
answered on 05 Jun 2010, 01:13 AM
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.
0
Valeri Hristov
Telerik team
answered on 07 Jun 2010, 09:16 AM
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.
Tags
ComboBox
Asked by
Mike Wishart
Top achievements
Rank 1
Answers by
Mike Wishart
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or