I will try to make it as simple as possible.
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, binding to the To property does not work. It seems to take only static values.
How to make this animation with MVVM? I cannot just put static data because it will change.
Thank.
source
share