我正在尝试为Windows Phone 8中的Listbox动画选择更改。以下动画有效:
但是下一个不起作用(System.InvalidOperationException: 无法解析指定对象上的TargetProperty (ContentControl.Background).(SolidColorBrush.Color)。)
我真的找不出理由。
<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}" />
我真的找不出理由。
ContentControl
上设置显式默认的Background
... - nemesvBackground
默认为null
,请参见我的答案。 - nemesv