Correct use DataTemplateSelector.(rredcat.blogspot.com)
submitted by
RredCat(299) 3 years, 6 months ago
n the many inherited from FrameworkElement in WPF contain a useful dependency property *TemplateSelector type of DataTemplateSelector. It can set our inherit from DataTemplateSelector class and override the method SelectTemplate(). This allow dynamic generate template for a content. Content-data we can get a elementary binding. And now feature: we can use all binding (even that what refet to ElementName), except TemplateBinding, therefore RelativSourceMode doesn't equal TemplatedParent.
|category: Windows Presentation Foundation
|Views: 115
tags:
DataTemplateSelector template WPF another
Everyones tags:
Your Tags: