I have a Border element on my page that contains some TextBlock elements contained in a grid, e.g. (simplified):
<Border Style="{StaticResource borderStyle}">
<Grid Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="Something" Grid.Column="0" Grid.Row="0" />
<TextBlock Text="Something else" Grid.Column="1" Grid.Row="0" />
</Grid>
</Border>
I have the following style defined:
<Style x:Key="borderStyle" TargetType="Border">
<Setter Property="CornerRadius" Value="0,0,15,15"/>
<Setter Property="Background" Value="Black"/>
<Setter Property="Opacity" Value="0.6"/>
</Style>
How would I add a VisualStateGroup (or something similar) to the style to change the opacity on mouseover? I can't seem to get it working for a Border element, is there a reason for this?