Why wouldn't a Storyboard value come from a resource or binding?

I have a construct below and it works:

 <Storyboard x:Key="GrowOnStart">
   <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Canvas.Left)" Storyboard.TargetName="window">
            <EasingDoubleKeyFrame KeyTime="0" Value="1024"/>

Why this does not work if I try something like this:

  <EasingDoubleKeyFrame KeyTime="0" Value="{DynamicResource StartingPositionLeft}"/>

And yes, I defined the resource before the storyboard. And a statement like the following won't work either:

 <EasingDoubleKeyFrame KeyTime="0" Value="{Binding StartingPositionLeft}"/>

And yes, this is a public property behind the code and this.DataContext is set to this .

+1
source share
1 answer

Source: https://habr.com/ru/post/1530323/


All Articles