I have this XAML view. The VisualStateGroups
for the visual triggers
works fine, but the VisualStateGroup
for the common states doesn't.
I try assign to a rectangle in the beginning and then neither work. In other views this works fine .. :(
<view:NavigationStoredPage.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Styles/ResponsiveStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</view:NavigationStoredPage.Resources>
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="rer">
<DiscreteObjectKeyFrame KeyTime="0" Value="#121212"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="rer">
<DiscreteObjectKeyFrame KeyTime="0" Value="#121212"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle Fill="Red" x:Name="rer" Width="100" Height="100" HorizontalAlignment="Left" Canvas.ZIndex="99" VerticalAlignment="Top" />