Simple hover effect in XAML?
问题 So, I was recently frustrated with a challenge to copy this effect: <style> a:hover {background-color:yellow; } </style> Using the XAML implementation in WinRT. What is the most condense solution? 回答1: Okay, so here's my attempt: <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="VisualStateGroup"> <VisualState x:Name="Normal"/> <VisualState x:Name="Hover"> <Storyboard> <ColorAnimation To="Yellow" Duration="0" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)