Workaround for WPF Freezable bug?
I don't believe there is a work-around for this. In having to deal with this myself, from what I've read, WPF auto-freezes resources at creation. So anytime you try to use a DynamicResource on that resource you will get the freezable exception.
Here is a quote from the Microsoft Foundation Team on what is happening:
"WPF will freeze any freezables inside a style or template. Styles and templates can be used on multiple threads, and freezables can't unless they're frozen. We're currently considering extending this to anything put inside Application.Resources, since that has the same threading problem... DynamicResource on a frozen freezable doesn't work, because a frozen freezable potentially has multiple parents -- so it's ambiguous which parent we would search for the resource."
To workaround this .net bug, change all of the Solid Color Brushes in your code to be freezeable. For example
<SolidColorBrush x:Key="WindowBackground" Color="Black" />
should be changed to:
<SolidColorBrush po:Freeze="True" x:Key="WindowBackground" Color="Black" />.
For more detailed instructions see here: How can WPF objects deriving from Freezable be frozen in XAML?.