Binding to 'To' In Storyboard
Posted
by Peanut
on Stack Overflow
See other posts from Stack Overflow
or by Peanut
Published on 2010-06-09T00:50:31Z
Indexed on
2010/06/09
8:02 UTC
Read the original article
Hit count: 297
I'll try to make this as simple as I can.
I want to do this:
<Storyboard x:Name="MoveToLocation">
<DoubleAnimation Duration="0:0:0.5" To="{Binding X}" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
</Storyboard>
As you may have noticed the Binding on 'To' Property does not work. It seems to only accept static values.
How does one do this animation with MVVM? I cant just put in static data, cause it's going to change.
Thanks.
© Stack Overflow or respective owner