Hello Mano,
The RadListView provides styles;
ItemStyle,
SelectedItemStyle and
PressedItemStyle. See the following documentation for guidance:
Item Styles. You can even use a
StyleSelector to choose a different style depending on a predefined condition, see
ItemStyle Selector documentation.
If you're referring to having a completely different ItemTemplate, almost no ListView type of object provide different DataTemplate-based properties on the condition of selection. You'll instead need to create a
Xamarin.Forms.DataTemplateSelector object and assign it to the RadLstView.ItemTemplateSelector property. We have a tutorial on how to accomplish this in the following article:
ItemTemplateSelector.
Once you've read that tutorial and are famliar with using a DataTemplateSelector, lets move on to the relevancy to changing a template based on selection.
First, you'll need to sync a model boolean property to your data model if there isn't one yet (make sure you invoke PropertyChanged for this property):
Then, subscribe to the
SelectionChanged event of the RadListView and toggle the data item's selected flag accordingly:
Finally, in the template selector, you can use this value to return the appropriate DataTemplate:
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items