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 ImageNew}" />
<MenuItem Header="Open" Icon="{StaticResource ImageOpen}" />
<MenuItem Header="Save" Icon="{StaticResource ImageSave}" />
<MenuItem Header="Export" Icon="{StaticResource ImageExport}" />
</Menu>
...
And here's the screenshot:
EDIT 2:
With great power comes great ... complexity :(.
It looks like the whole menu template should be redefined to achieve my purpose. The 3D effect is given by a MenuItem child border (identified with Snoop) which, on mouse over, sets its BorderStyle to raised. I don't know if that border style can be touched inside the <Style TargetType="MenuItem">
element, any feedback would be greatly appreciated.