views:

19

answers:

0

Hi stackoverflow,

I'm looking for some kind of workaround for binding a Value in a Storyboard. Thing is, that I need to bind the value in a tag, like this:

<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="testelement" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                <SplineColorKeyFrame KeyTime="00:00:00" Value="{Binding FrontColor}"/>
                                <SplineColorKeyFrame KeyTime="00:00:00.2500000" Value="{Binding BackColor}" KeySpline="0,0,0.5,1"/>
                            </ColorAnimationUsingKeyFrames>

I have tried a workaround where I define a Color tag and then use that one as StaticResource in my Value property. However, the value property don't take either a Color or a SolidColorBrush class it seems.

Is there any way to set this color dynamically from an object? I've also tried to define the color in hex as a string on the object i'm trying to bind to, but that didn't work either.

Any input on this will be greatly appreciated!

Thanks in advance.