Binding to 'To' In Storyboard

前端 未结 2 1343
难免孤独
难免孤独 2021-01-21 05:12

I\'ll try to make this as simple as I can.

I want to do this:


   

        
相关标签:
2条回答
  • 2021-01-21 05:44

    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.

    0 讨论(0)
  • 2021-01-21 05:47

    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.

    0 讨论(0)
提交回复
热议问题