【发布时间】:2017-10-28 05:14:25
【问题描述】:
当图像启用时,我试图在其样式内旋转我的图像。但是它会抛出一个错误:
无法解析属性路径中的所有属性引用 '角度'。验证适用的对象是否支持这些属性。
有人知道这里的问题是什么吗?
<Image x:Name="Logo" Source="Resources/Logo.png" RenderTransformOrigin=".5,.5">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Angle" By="10" To="360" RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
</Trigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
我尝试了 Storyboard.TargetProperty="Image.Angle" 但结果相同。
【问题讨论】:
标签: c# wpf xaml animation storyboard