Telerik UI for Windows Phone by Progress

RadAutoCompleteBox supports highlighting of the text portion within a filtered suggestion that matches the current input in the control. Thanks to a flexible highlighting mechanism any custom data templates used to present the filtered suggestions can be integrated with the highlighting feature.

Activating Item Highlighting in RadAutoCompleteBox

To activate the Item Highlighting feature in RadAutoCompleteBox you should first define a custom Data Template for the filtered suggestions by using the SuggestionItemTemplate property. After that you should set the IsElementHighlighted attached property on one or multiple TextBlock elements (depending on the visual structure of your data template) that need to be highlighted:

CopyXAML
<telerikInput:RadAutoCompleteBox x:Name="autoCompleteBox">
    <telerikInput:RadAutoCompleteBox.SuggestionItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Text}" telerikInput:RadAutoCompleteBox.IsElementHighlighted="True"/>
        </DataTemplate>
    </telerikInput:RadAutoCompleteBox.SuggestionItemTemplate>
</telerikInput:RadAutoCompleteBox>

By default to highlight the corresponding symbols the current accent brush on the device is used. If you, however, would like to override the style of the highlighting you should use the HighlightStyle attached property exposed by RadAutoCompleteBox on the corresponding TextBlock element:

CopyXAML
<telerikInput:RadAutoCompleteBox x:Name="autoCompleteBox">
    <telerikInput:RadAutoCompleteBox.SuggestionItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Title}" telerikInput:RadAutoCompleteBox.IsElementHighlighted="True">
                <telerikInput:RadAutoCompleteBox.HighlightStyle>
                    <telerikInput:HighlightStyle Foreground="Green" FontSize="26"/>
                </telerikInput:RadAutoCompleteBox.HighlightStyle>
            </TextBlock>
        </DataTemplate>
    </telerikInput:RadAutoCompleteBox.SuggestionItemTemplate>
</telerikInput:RadAutoCompleteBox>