I have a rectangle with several captions and images above it, and I have it so that when the user hovers over the rectangle, the background changes to a gradient:
<Rectangle Height="88" HorizontalAlignment="Left" Margin="54,28,0,0" Name="rectangle2" VerticalAlignment="Top" Width="327" Cursor="Hand"> <Rectangle.Style> <Style TargetType="{x:Type Rectangle}"> <Setter Property="Fill" Value="Transparent" /> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Fill"> <Setter.Value> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Color="White" Offset="0.0" /> <GradientStop Color="#eee" Offset="1" /> </LinearGradientBrush> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style> </Rectangle.Style> </Rectangle>
However, when I hover over one of the labels above the rectangle, the background gradient is not displayed.
I want to make the gradient appear when you hover over the labels, as well as the rectangle.
Is it possible?
source share