Notify DataTemplateSelector about the change
Posted
by Tigran
on Stack Overflow
See other posts from Stack Overflow
or by Tigran
Published on 2009-08-21T23:03:17Z
Indexed on
2010/03/27
20:03 UTC
Read the original article
Hit count: 534
wpf
I use DataTemplateSelector for ListView column headers template selection. ListView itself is in DataTemplate and ends up in a few tabs. So, in practice, I have same DataTemplate (so ListView too) shared between more TabItems. This means that if I select tab {A} and set XDataTemplate on ListView column {AColumn}, if I switch the tab, lets say to tab {B}, on {B}'s ListView (that is always the same one) column {AColumn} we will see the same XDataTemplate, because we share same UI data. So I created data layer where I hold relational information about {Tab} <-> {ListView:Column} <-> {HeaderContent}, which actually reads DatatemplateSelector in order correctly update UI on user screen. What I need is to notify to DataTemplateSelector to update current view in the moment that I need. How can I achieve that goal? Thank you.
© Stack Overflow or respective owner