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

Xamarin.Forms - ListView (Data Template Selector Sample)

1 Answer 223 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Yuvaraj
Top achievements
Rank 1
Yuvaraj asked on 07 Mar 2018, 09:32 AM

Hi Team,

I need a sample in Xamarin.Forms (ListView)  like 5 different templates. That are heavy loaded weighted contents like 
Template 1 - print 5 images with binding context each time randomly select the images.

Template 2 -  labels1, labels2, labels3, labels4, labels5

Other 3 templates combination of this. In the view First templates cover the first view. That are items are more than 10. When I perform scrolling then only next template in the view. And the templates repeated in the view. Over all items count is more than 500. If have any KB links about this sample then send me the links quickly.

Thanks,

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 12 Mar 2018, 08:15 AM
Hello,

RadListView provides ItemTemplateSelector property that can be used to apply different template on each item according to a certain condition, for more details check here:
https://docs.telerik.com/devtools/xamarin/controls/listview/cells/listview-itemtemplateselector

The logic for defining the template you explained is quite complex and we do not have such an example at hand.  Generally. the item templates are applied when the items are loaded and are not update on scrolling.  Since, you've mentioned you're loading around 500 items, I guess that you're using LoadOnDemand, is that the case?
Can you elaborate more on the exact scenario you have?

Looking forward to you your reply.

Regards,
Yana
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
Tags
Chart
Asked by
Yuvaraj
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or