The original question was asked here: http://stackoverflow.com/questions/3543515/wpf-reapply-datatemplateselector-when-a-certain-value-changes. There hasn't been posted an answer to this.
My situation is worse, than described in the link above, for I generate the data template at runtime, based on a property value. So for me DataTemplate triggers won't work.
The question is, what do I need to do (.NET 4.0) to make the following XAML create and propagate a new DataTemplate:
<ItemsControl ItemTemplateSelector="{StaticResource ItemTemplateCreator}" .../>
Here I issue an InvalidateProperty on ItemTempalteSelectorProperty, when the property I'm listening to changes. It issues allright, the new template is being generated, but nothing changes in the UI.
Any help? What hooks am I missing?
Mikhail