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)