Thanks for your interest in RadControls for Windows Phone 7
As far as I can understand your scenario, you would like to have a custom template selector which is executed when the Selected
state of an item is changed and thus provide different templates for selected/not-selected items?
allows you to define a template selector which will be executed for each visual item in the viewport of the control. The template selector provides you with the instance of the visual item for which you will have to define a template. The visual item has a property which defines whether it is selected or not so you can use it to decide which template you will be assigning.
In the current version of the control, however, the template selector will not be executed when the state of an item is selected/deselected. You can easily workaround this by handling the SelectionChanging/SelectionChanged
events and calling the instance of the template selector manually for both the deselected and the selected items. This implies a few lines of code in your code-behind file.
Since your scenario is interesting, we may consider upgrading the RadDataBoundListBox
control to support this behavior out of the box so you won't need to handle the selection
events and manually call the template selector.
We look forward to receiving further details on your scenario so that we make sure that we correctly understand it and make the needed estimations.
Thanks for your time.
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>