Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explicitly refresh DataTemplate from a DataTemplateSelector?

Tags:

I set up a ContentControl.DataTemplateSelector to my desired one.
I want that according to a command or whatever, call the ContentControl to reselect the template from the selector by either xaml or code.

Thank

like image 537
Shimmy Weitzhandler Avatar asked Jan 18 '10 11:01

Shimmy Weitzhandler


1 Answers

Late to the party, I know. =)

When faced with this problem, I found it easiest to explicitly set a new TemplateSelector like

MyContentControl.ContentTemplateSelector =
     new MyDataTemplateSelector();
like image 129
Jens Avatar answered Sep 28 '22 09:09

Jens