How to remove the "button" effect for a menu item (WPF)
- by Sorin Comanescu
Hi,
When the mouse is over a menu item (first level) it displays a 3D button effect. How can this be removed?
Thanks.
EDIT:
Tried
<Style TargetType="MenuItem">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="Transparent">
<Setter Property="BorderThickness" Value="0">
</Trigger>
</Style.Triggers>
</Style>
with no effect.
The menu XAML:
<Window x:Class="UCWPF.Window3"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:UCWPF.Converters"
Title="Window3" Height="600" Width="600"
Background="{StaticResource WindowBackgroundBrush}"
>
<StackPanel Style="{StaticResource WindowContainerStyle}">
<Menu>
<MenuItem Header="New" Icon="{StaticResource ImageExport}" />
<MenuItem Header="Open" Icon="{StaticResource ImageOpen}" />
<MenuItem Header="Save" Icon="{StaticResource ImageSave}" />
<MenuItem Header="Export" Icon="{StaticResource ImageExport}" />
</Menu>
...
And here's the screenshot: