I\'ll try to make this as simple as I can.
I want to do this:
DoubleAnimation
is also not a FrameworkElement
hence binding doesn't work to that either. See my answer to your previous question.
In order to achieve your goal here you will need to take the contents of your DataTemplate
and turn it into a UserControl
. This new control can then expose a set of dependency properties that you need to bind to, including one for To
value of the storyboard.
If you're trying to do it in a Style, that's why it's not working. Silverlight will Freeze it because it's shared across all instances of that style.
Try putting it in the element itself and that should work.