What methods are available for using non-fixed values in Storyboard Animations?
As you may know, the Animation.To
and Animation.From
properties must be strictly literal values, or marked up resources using the {StaticResource}
extension, else a rather draconian InvalidOperationException
shall appear: Cannot freeze this Storyboard timeline tree for use across threads.
Certain techniques, including (but not limited to) ResourceDictionary
swapping, repurposing of unused element properties in a ControlTemplate
and/or attached properties for styling seem to stand in the way of this limitation.
Never minding the (probably quite understandable) reason behind this limitation, please share your experience with storyboarding animations which don't have im开发者_StackOverflow社区mutable To
and From
values.
In some cases only providing a To
or By
value solves the problem because the animation will then be relative to the current value.
精彩评论