我想在xaml storyboard
中修改RenderTransformOrigin
。该值不应被动画化,一个即时的改变也可以。下面的代码是不起作用的:
<Storyboard x:Key="StoryboardFadeIn">
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransformOrigin).(Point.X)" Storyboard.TargetName="UserControl" To="0"/>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransformOrigin).(Point.Y)" Storyboard.TargetName="UserControl" To="0"/>
</Storyboard>
是否可以在动画中更改此属性(仅使用xaml)?
错误代码:
The property "X" is not a DependencyProperty. To be used in markup, non-attached properties must be exposed on the target type with an accessible instance property "X".