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

DropdownItemTemplate

2 Answers 93 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Przemysław
Top achievements
Rank 1
Przemysław asked on 05 Aug 2014, 09:01 PM
I would like to create one universal class because I want to use the control in many places for many things. I have custom class (Picker) which inherit from AutoCompleteBox, inside I have my logic( I have dependency property and I can choose what will be displaying as search text) and also I have xaml with custom style. Inside xaml I have class with custom filtering methods and custom style. Next I have 4 class which inherit from Picker(class) and inside those class I have downloading data from data base (changing ItemSource). Now I can choose which controls will be displaying and which data will be loading(this solution give me 4 controls with different data but I have only one style) everything is working but I have problem with displaying data inside dropdownItem. Now I can choose manually what will be displaying inside dropdown(after the searching) because I have custom dropdown template. I would like to create universal  dependency property which let me chose what will be displaying after the searching (which property from searching object). For example inside User Picker I would like to display First Name and Last Name, inside Role Picker I would like to display only User Role. Everything should have only one style and inside style i would like to choose what will be displaying using dependency property when I am creating controls. Can I create something like this? How I can add this property to style inside Picker class? I am adding drawing with diagram classes

2 Answers, 1 is accepted

Sort by
0
Przemysław
Top achievements
Rank 1
answered on 11 Aug 2014, 04:25 AM
I wait 6 days for a response. Please help with this problem.
0
Yana
Telerik team
answered on 11 Aug 2014, 08:53 AM
Hello Przemysław,

This seems quite a custom scenario and we do not have a ready to use approach that we can suggest. 

As a side note, our forums are a community resource and if you have any concrete questions regarding our controls, you could send send us a support ticket instead that will guarantee you a 24 hours ( Mon-Fri) reply. In the ticket, please send us more details and preferably sample code showing the exact scenario you have, so we to be able to provide proper assistance.

Regards,
Yana
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
AutoCompleteBox
Asked by
Przemysław
Top achievements
Rank 1
Answers by
Przemysław
Top achievements
Rank 1
Yana
Telerik team
Share this question
or