我正在尝试为 Windows Phone 8 中列表框的选择更改设置动画。以下动画有效:
<ColorAnimation Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)" Duration="00:00:00.25" From="{StaticResource PhoneForegroundColor}" To="{StaticResource PhoneAccentColor}" />
但是下一个不起作用(System.InvalidOperationException:无法在指定对象上解析 TargetProperty (ContentControl.Background).(SolidColorBrush.Color)。
<ColorAnimation Storyboard.TargetProperty="(ContentControl.Background).(SolidColorBrush.Color)" Duration="00:00:00.25" From="{StaticResource PhoneForegroundColor}" To="{StaticResource PhoneAccentColor}" />
对于我的生活,我无法找出原因。