WPF Animation "Cannot freeze this Storyboard timeline tree for use across threads" WPF Animation "Cannot freeze this Storyboard timeline tree for use across threads" wpf wpf

WPF Animation "Cannot freeze this Storyboard timeline tree for use across threads"


Can you post your Storyboard? It sounds like you have some kind of Binding in the Storyboard definition.


Ok so, as I suspected, it's because you're using a Binding in your Storyboard. You can't do this because WPF attempts to freeze all the resources leveraged by a template for efficiency and when you use a Binding on a Freezable, in this case the Storyboard, it prevents it from being able to be frozen.


There is a technique that you can use to get around the Freezable issue that allows you to use a binding for the "To" value of your animation (rather than hard-coding a value there). Its pretty straightforward and I've outlined it here.


Old question but might be useful for other people.Sometimes creating the Storyboard in the code-behind can be simpler: https://stackoverflow.com/a/10848781/779521