<Window.Resources>
<Style TargetType="MenuItem">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Foreground" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
<ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
<Grid>
<Border Height="25" Width="80" Name="Head">
<ContentPresenter ContentSource="Header" RecognizesAccessKey="True" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Popup Name="Popup" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" PopupAnimation="Fade">
<StackPanel IsItemsHost="True" Background="#01FFFFFF" Focusable="True"/>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="true">
<Setter TargetName="Head" Property="Background" Value="#3500ACFF"/>
<Setter TargetName="Head" Property="BorderBrush" Value="#FF00ACFF"/>
<Setter TargetName="Head" Property="BorderThickness" Value="1,1,1,1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Window.Resources>
<Grid>
<Menu VerticalAlignment="Top" Background="Transparent">
<MenuItem Name="Setting" Header="Настройки" Foreground="Lime">
<MenuItem Header="Свойства"/>
<MenuItem Header="О программе"/>
<MenuItem Header="Выход"/>
</MenuItem>
</Menu>
</Grid>
<MenuItem Name="Setting" Header="Настройки">
<MenuItem.Style>
<Style TargetType="MenuItem" BasedOn="{StaticResource {x:Type MenuItem}}">
<Setter Property="Foreground" Value="Lime"></Setter>
</Style>
</MenuItem.Style>
<MenuItem Header="Свойства"/>
<MenuItem Header="О программе"/>
<MenuItem Header="Выход"/>
</MenuItem>
<Window.Resources>
<Style x:Key="MenuItem"> <!--Стиль меню-->
<Setter Property="MenuItem.Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="MenuItem.IsMouseOver" Value="true">
<Setter Property="MenuItem.Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
<ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}"> <!--Стиль подменю-->
<Grid>
<Border Height="25" Width="80" Name="Head">
<ContentPresenter ContentSource="Header" RecognizesAccessKey="True" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Popup IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" PopupAnimation="Fade">
<StackPanel IsItemsHost="True" Background="#01FFFFFF" Focusable="True"/>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="true">
<Setter TargetName="Head" Property="Background" Value="#3500ACFF"/>
<Setter TargetName="Head" Property="BorderBrush" Value="#FF00ACFF"/>
<Setter TargetName="Head" Property="BorderThickness" Value="1,1,1,1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Window.Resources>
<Grid>
<Menu VerticalAlignment="Top" Background="Transparent"> <!--Меню-->
<MenuItem Style="{StaticResource MenuItem}" Header="Настройки">
<MenuItem Style="{StaticResource MenuItem}" Header="Свойства"/>
<MenuItem Style="{StaticResource MenuItem}" Header="О программе"/>
<MenuItem Style="{StaticResource MenuItem}" Header="Выход"/>
</MenuItem>
</Menu>
</Grid>