I am trying to animate a change in Listbox selection in Windows Phone 8. The following animation Works:
<ColorAnimation Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)" Duration="00:00:00.25" From="{StaticResource PhoneForegroundColor}" To="{StaticResource PhoneAccentColor}" />
But the following does not work (System.InvalidOperationException: Cannot resolve TargetProperty (ContentControl.Background). (SolidColorBrush.Color) for the specified object.
<ColorAnimation Storyboard.TargetProperty="(ContentControl.Background).(SolidColorBrush.Color)" Duration="00:00:00.25" From="{StaticResource PhoneForegroundColor}" To="{StaticResource PhoneAccentColor}" />
In life, I canβt understand the reason.
source share