Creating a Custom View Mode that Supports a Template Selector(cloudstore.blogspot.com)
submitted by
dereklakin(1565) 3 years, 11 months ago
The controls that inherit from ItemsControl (such as ListBox, ListView, and so on) expose an ItemTemplateSelector property that you can use instead of the ItemTemplate property to specify a DataTemplateSelector. The DataTemplateSelector enables you to specify your own custom logic that determines which DataTemplate should be applied to each item.
This article shows how to create a custom view mode for the ListView control that supports a DataTemplateSelector to enable dynamic selection of the DataTemplate for each item.
|category: Windows Presentation Foundation
|Views: 64
tags:
WPF another
Everyones tags:
Your Tags: