From 3272ee33e146068f302210226ccb7d152e8a648a Mon Sep 17 00:00:00 2001 From: riyas Date: Mon, 4 Sep 2023 17:01:53 +0530 Subject: [PATCH] Update README.md --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f7bd486..e7fb3f5 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,79 @@ This sample demonstrate how to customize the appearance of the .NET MAUI ListVie A quick-start example to help you how to customize the appearance of the .NET MAUI ListView control by using different templates. -Watch the video: Coming soon... +Watch the video: https://www.youtube.com/watch?v=qp4MglFU0q4&t=1s Documentation: https://help.syncfusion.com/maui/listview/viewappearance +## XAML + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## C# +internal class ContactInfoDataTemplateSelector : DataTemplateSelector + { + public DataTemplate NormalTemplate { get; set; } + public DataTemplate MissedCallTemplate { get; set; } + + protected override DataTemplate OnSelectTemplate(object item, BindableObject container) + { + var contact = (ContactInfo)item; + if(contact != null) + { + if (contact.IsMissed) + return MissedCallTemplate; + else + return NormalTemplate; + } + + return NormalTemplate; + } + } + ## Requirements to run the demo ## To run the sample demo, refer to [System Requirements for .NET MAUI.](https://help.syncfusion.com/maui/system-requirements)