C# – How to dinamically select a DataTemplate for each item in a list
Using a DataTemplateSelector, we can determine at runtime which DataTemplate to apply to show items in a ItemsControl derivated control like the GridView, ListView, ListBox, etc. For example, suppose we have a list of items of the below type: And we want to show either text or image content in the same list, based on … Continue reading “C# – How to dinamically select a DataTemplate for each item in a list”