I have a border element on which I have bitmap effect of shadow:
<Border x:Name="ListItemPressable"
Background="{StaticResource CanvasBrush}"
CornerRadius="5"
MouseDown="ListItemPressed" Cursor="Hand"
BitmapEffect="{StaticResource BottomShadowEffect}">
</Border>
I want to show this bitmap effect only when border element is hovered on. How can I achieve this thing?
CodePudding user response:
Ok I just figured it out myself. For anyone looking for it, here's solution:
<Border.Style>
<Style TargetType="{x:Type Border}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BitmapEffect" Value="{StaticResource BottomShadowEffect}"/>
</Trigger>
</Style.Triggers>
</Style>
</Border.Style>