RadHighlightTextBlock in an editable RadComboBox
Environment
Product Version | 2023.3.1011 |
Product | RadHighlightTextBlock for WPF |
Description
How to use RadHighlightTextBlock
in an editable RadComboBox
.
Solution
Define a new DataTemplate
that contains a RadHighlightTextBlock instance and set it to the ItemTemplate
property of RadComboBox. Bind the Text
property of the RadHighlightTextBlock to the property from the items' model that will be displayed in the RadComboBox instance. Bind the HighlightText
property to the Text
property of RadComboBox.
Define the items' model and the view model
Creating a DataTemplate with a RadHighlightTextBlock
Set the custom DataTemplate to the ItemTemplate property of RadComboBox
Integration with the RadHighlightTextBlock control and enabled autocomplete functionality is not supported. If you need highlighting in an autocomplete scenario, you can check the RadHighlightTextBlock with RadAutoCompleteBox and RadHighlightTextBlock with RadAutoSuggestBox articles.