<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style x:Key="Main_MenuItem" TargetType="MenuItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Border x:Name="border" Background="#FFFFFF" BorderThickness="0" Height="30">
                        <Grid Margin="20,0,20,0">
                                <ContentPresenter x:Name="contentPresenter"
                                                  ContentSource="Header" 
                                                  TextBlock.Foreground="#000000" 
                                                  TextBlock.FontFamily="SegoeUI"
                                                  TextBlock.FontSize="15"
                                                  HorizontalAlignment="Center"
                                                  VerticalAlignment="Center">
                                </ContentPresenter>
                            </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
                            <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>

                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="True">
                            <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
                            <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Dropdown_MenuItem" TargetType="MenuItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Border x:Name="border" 
                                Background="#FFFFFF"
                                BorderThickness="0"
                                Height="40">
                        <Grid>
                            <ContentPresenter x:Name="contentPresenter"
                                    ContentSource="Header" 
                                                  TextBlock.Foreground="#000000" 
                                                  TextBlock.FontFamily="SegoeUI"
                                                  TextBlock.FontSize="15"
                                                  HorizontalAlignment="Center"
                                                  VerticalAlignment="Center"
                                                  Margin="20,0,20,0">
                            </ContentPresenter>
                            <Popup x:Name="Part_Popup"
                                       AllowsTransparency="True"
                                       IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
                                       Placement="Bottom"
                                       PopupAnimation="Fade">
                                <Border Name="SubMenuBorder" 
                                            Background="#484546" 
                                            BorderBrush="#484546">
                                    <ScrollViewer x:Name="SubMenuScrollViewer" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
                                        <Grid RenderOptions.ClearTypeHint="Enabled">
                                            <Canvas HorizontalAlignment="Left" VerticalAlignment="Top"></Canvas>
                                            <ItemsPresenter x:Name="ItemsPresenter"></ItemsPresenter>
                                        </Grid>
                                    </ScrollViewer>
                                </Border>
                            </Popup>
                        </Grid>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
                            <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
                        </Trigger>
                        <Trigger Property="IsSuspendingPopupAnimation"
                                     Value="True">
                            <Setter Property="PopupAnimation"
                                        TargetName="Part_Popup"
                                        Value="None"></Setter>
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="True">
                            <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
                            <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Sub_MenuItem" TargetType="MenuItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Border x:Name="border" 
                                Background="#FFFFFF" 
                                BorderThickness="0" 
                                Height="40" >
                        <Grid Margin="20,0,20,0">
                            <ContentPresenter x:Name="contentPresenter"
                                    ContentSource="Header" 
                                                  TextBlock.Foreground="#000000" 
                                                  TextBlock.FontFamily="SegoeUI"
                                                  TextBlock.FontSize="15"
                                                  HorizontalAlignment="Left"
                                                  VerticalAlignment="Center">
                            </ContentPresenter>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
                            <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="True">
                            <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
                            <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
     <Style x:Key="Sub_Dropdown_MenuItem" TargetType="MenuItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type MenuItem}">
                        <Border x:Name="border" 
                                Background="#FFFFFF" 
                                BorderThickness="0" 
                                Height="40">
                            <Grid Margin="20,0,0,0">
                                <ContentPresenter x:Name="contentPresenter"
                                    ContentSource="Header" 
                                                  TextBlock.Foreground="#000000" 
                                                  TextBlock.FontFamily="SegoeUI"
                                                  TextBlock.FontSize="15"
                                                  HorizontalAlignment="Left"
                                                  VerticalAlignment="Center"
                                                  >
                                </ContentPresenter>
                                <Popup x:Name="Part_Popup"
                                       AllowsTransparency="True"
                                       IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
                                       Placement="Right" 
                                       PopupAnimation="Fade">

                                    <Border Name="SubMenuBorder" 
                                            Background="#484546" 
                                            BorderBrush="#FFFFFF">
                                        <ScrollViewer x:Name="SubMenuScrollViewer" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
                                            <Grid RenderOptions.ClearTypeHint="Enabled">
                                                <Canvas HorizontalAlignment="Left" VerticalAlignment="Top"></Canvas>
                                                <ItemsPresenter x:Name="ItemsPresenter"></ItemsPresenter>
                                            </Grid>
                                        </ScrollViewer>
                                    </Border>
                                </Popup>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
                            <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="True">
                                <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
                                <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
                                <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    <Style x:Key="Dropdown_Sub_MenuItem" TargetType="MenuItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Border x:Name="border" 
                                Background="#FFFFFF" 
                                BorderThickness="0" 
                                Height="40">
                        <Grid Margin="20,0,20,0">
                            <ContentPresenter x:Name="contentPresenter"
                                    ContentSource="Header" 
                                                  TextBlock.Foreground="#000000" 
                                                  TextBlock.FontFamily="SegoeUI"
                                                  TextBlock.FontSize="15"
                                                  HorizontalAlignment="Left"
                                                  VerticalAlignment="Center">
                            </ContentPresenter>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
                            <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="True">
                            <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
                            <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
                            <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>