I have a UserControl in my application that uses a template like so:
<UserControl> ...
Template="{DynamicResource MyTemplate}"
</UserControl>
The template is defined in the same XAML file and it is working fine. My problem is that I do not want the template to be active all the time. I would need to programatically disable and enable it when neccessary.
I have already tried:
userControl.Template = null;
but this will make the entire user control dissapear.
Any ideas?