In my WPF applications, I allow users to switch between custom Light and Dark themes. I use a single set of control templates and handle the theme switch by swapping out brush resources.
This works really well except for brushes that are referenced in animations within storyboards in the control templates.
The Storyboard freezes all the resources inside it.
This forces me to clear all my merged dictionaries and reload them. I am trying to avoid that.
Q: Is there a way to force the Storyboard to essentially thaw, update its resources, and refreeze?
I tried cloning the Storyboard and updating the parent VisualState, but that didn't seem to work.
Any hard-core WPF gurus out there? :)