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

How to display superscript and subscript in selected text in AutocompleteBox

3 Answers 57 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Shengwei
Top achievements
Rank 1
Shengwei asked on 18 Nov 2013, 08:09 AM
Hi, 

I wonder does AutocompleteBox support displaying Subscript and superscript if the autocomplete dropdown contains these values?

How to achieve that? thank you.

3 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 20 Nov 2013, 09:43 AM
Hello,

The current version of RadAutoCompleteBox doesn't support superscript and subscript out of the box. Its built-in filtering mechanism uses the property set in its TextSearchPath or DispalyMemeberPath to search through the items. In order to be able to search through the superscript, subscript and a property of the bound Item, you could implement a custom logic that combines all of those values into one string property and set that property to the TextSearchPath.

Hope this is helpful.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Shengwei
Top achievements
Rank 1
answered on 25 Nov 2013, 07:10 AM
Thank you for the reply. 

Currently we are using data like "string<sub>2</sub>" to indicate part of the string is a super script or subscript, 
The filtering has no problem by using TextSearchPath and SearchText as i will simply treat <sub></sub> as string.

what i want is how do i style the autocompletbox textbox to display a subscript or superscript using Converter? In this case it is just a styling issue instead of a data issue.

Is my approach correct and how can i style the text inside the autocomplete textbox? 

thank you
0
Vladi
Telerik team
answered on 25 Nov 2013, 09:56 AM
Hi,

When the SelectionMode is set to Multiple (its default value) you could create a custom DataTemplate and set it to the BoxesItemTemplate property of the RadAutoCompleteBox control.

When the SelectionMode is set to Single the displayed text is a simple TextBox and in the current version of the control it is not possible to customize its looks.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
AutoCompleteBox
Asked by
Shengwei
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Shengwei
Top achievements
Rank 1
Share this question
or