	  
	   
    
		

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="clr-namespace:C1.WPF">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!--******************** C1Menu ********************-->

    <!-- CornerRadius @ C1Menu -->
    <CornerRadius x:Key="MenuCornerRadius">1</CornerRadius>
    <!-- CornerRadius @ C1Menu SubItem -->
    <CornerRadius x:Key="MenuSubItemCornerRadius">1</CornerRadius>
    <!-- CornerRadius @ C1MenuItem -->
    <CornerRadius x:Key="MenuItemCornerRadius">1</CornerRadius>

    <!-- Brush @ C1Menu BorderBrush -->
    <SolidColorBrush x:Key="WpfMenuBorderBrush" Color="#FF909090" />

    <!-- Brush @ C1Menu SubItem Background-->
    <SolidColorBrush x:Key="MenuSubItemBackgroundBrush" Color="#FFF5F7F9" />
    <!-- Brush @ C1Menu SubItem Left Panel Background-->
    <SolidColorBrush x:Key="MenuSubItemLeftPanelBackgroundBrush" Color="#FFE9EEF5" />
    <!-- CornerRadius @ C1Menu SubItem Left Panel -->
    <CornerRadius x:Key="SubItemLeftPanelCornerRadius">1 0 0 1</CornerRadius>

    <!-- BorderThickness @ C1MenuItem -->
    <Thickness x:Key="MenuItemBorderThickness">1</Thickness>

    <Color x:Key="HighlightedColor">#FFBFE1EA</Color>
    <Color x:Key="OpenedColor">#FF8ED1E2</Color>
    <SolidColorBrush x:Key="HightlightedColorBrush" Color="{StaticResource HighlightedColor}" />
    <SolidColorBrush x:Key="OpenedColorBrush" Color="{StaticResource OpenedColor}" />

    <!-- Brush @ C1MenuItem Highlighted Background -->
    <LinearGradientBrush x:Key="MenuItemHighlightedBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFDCEEF3" Offset="0" />
        <GradientStop Color="#FFC5E3ED" Offset="1" />
    </LinearGradientBrush>
    <!-- Brush @ C1MenuItem Opened Background -->
    <LinearGradientBrush x:Key="MenuItemOpenedBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFC6E5F0" Offset="0" />
        <GradientStop Color="#FFA8D4E3" Offset="1" />
    </LinearGradientBrush>

    <!-- Style @ C1Menu CheckBox Icon -->
    <Style x:Key="MenuCheckBoxIconStyle" TargetType="Path">
        <Setter Property="Height" Value="10" />
        <Setter Property="Width" Value="10.5" />
        <Setter Property="Margin" Value="1,1,0,1.5" />
    </Style>

    <Style x:Key="MenuListContainer" TargetType="ContentControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource MenuSubItemBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
                        <Border x:Name="BackgroundElement" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MenuSubItemCornerRadius}">
                            <c1:C1ScrollViewer BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" HorizontalScrollBarVisibility="Collapsed" VerticalScrollBarVisibility="Visible" BorderThickness="0">
                                <ContentPresenter x:Name="Content" />
                            </c1:C1ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <ControlTemplate x:Key="FirstLevelMenuTemplate" TargetType="c1:C1MenuItem">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualState x:Name="Closed" />
                    <VisualState x:Name="Opened">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="OpenedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="HighlightedStates">
                    <VisualState x:Name="NonHighlighted" />
                    <VisualState x:Name="Highlighted">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HighlightedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding HeaderBackground}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
            <c1:C1BrushBuilder x:Name="HighlightedBackground" Input="{TemplateBinding HighlightedBackground}" DesignBrush="{StaticResource GeneralGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
            <c1:C1BrushBuilder x:Name="OpenedBackground" Input="{TemplateBinding OpenedBackground}" DesignBrush="{StaticResource GeneralGradientSelectedBackground}" DesignColor="{StaticResource OpenedColor}" />
            <Grid x:Name="HeaderPanel">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Border Grid.ColumnSpan="2" Background="{Binding ElementName=BackgroundBrush, Path=Output}" />
                <Border x:Name="OpenedElement" Grid.ColumnSpan="2" Background="{Binding ElementName=OpenedBackground, Path=Output}" BorderThickness="{StaticResource MenuItemBorderThickness}" BorderBrush="{TemplateBinding OpenedBackground}" CornerRadius="{StaticResource MenuCornerRadius}" Visibility="Collapsed" />
                <Border x:Name="HighlightedElement" Grid.ColumnSpan="2" Background="{Binding ElementName=HighlightedBackground, Path=Output}" BorderThickness="{StaticResource MenuItemBorderThickness}" BorderBrush="{TemplateBinding HighlightedBackground}" CornerRadius="{StaticResource MenuCornerRadius}" Visibility="Collapsed" />
                <ContentControl x:Name="MenuIcon" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" IsTabStop="False" />
                <ContentControl Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" IsTabStop="False" Background="{TemplateBinding HeaderBackground}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding HeaderForeground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                    <ContentPresenter x:Name="HeaderPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}" Margin="{TemplateBinding Padding}">
                                    <ContentPresenter.RecognizesAccessKey>
                                        true
                                    </ContentPresenter.RecognizesAccessKey>
                    </ContentPresenter>
                </ContentControl>
            </Grid>
            <Popup x:Name="SubItemsPopup" VerticalAlignment="Bottom">
                <ContentControl Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{Binding Path=BorderThickness, RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{Binding Path=BorderBrush, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource MenuListContainer}" MaxHeight="{Binding Path=SubMenuMaxHeight, RelativeSource={RelativeSource TemplatedParent}}">
                    <ItemsPresenter x:Name="SubItemsPresenter" />
                </ContentControl>
            </Popup>
            <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="{StaticResource MenuSubItemCornerRadius}" IsHitTestVisible="False" Opacity="0" Visibility="{TemplateBinding DisabledCuesVisibility}" />
        </Grid>
    </ControlTemplate>

    <!-- C1MenuItem Style when the menu item is in the first level -->
    <Style x:Key="FirstLevelMenuStyle" TargetType="c1:C1MenuItem">
        <Setter Property="Template" Value="{StaticResource FirstLevelMenuTemplate}" />
    </Style>

    <!-- @ C1Menu CheckBox -->
    <Style x:Key="MenuCheckBoxStyle" TargetType="CheckBox">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Padding" Value="4,1,0,0" />
        <Setter Property="Height" Value="16" />
        <Setter Property="Width" Value="16" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked" />
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Path x:Name="CheckIcon" Data="M0,5.7988567 L2.7333393,5.0066962 L4.0666714,7.0785151 C4.0666714,7.0785151 5.5397763,3.3975108 6.9999976,1.7154117 C8.53333,-0.050929058 11,0.00014400299 11,0.00014400299 C11,0.00014400299 9.1054287,1.5756328 8.4666672,2.3763855 C7.4513879,3.6490839 4.3819699,10 4.3819699,10 z" Fill="{TemplateBinding Foreground}" Style="{StaticResource MenuCheckBoxIconStyle}" Opacity="0" />
                            <Rectangle x:Name="IndeterminateIcon" Height="2" Width="6" Fill="{TemplateBinding Foreground}" Opacity="0" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="NonFirstLevelMenuTemplate" TargetType="c1:C1MenuItem">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualState x:Name="Closed" />
                    <VisualState x:Name="Opened">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="OpenedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="HighlightedStates">
                    <VisualState x:Name="NonHighlighted" />
                    <VisualState x:Name="Highlighted">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HighlightedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <c1:C1BrushBuilder x:Name="OpenedBackground" Input="{TemplateBinding OpenedBackground}" DesignBrush="{StaticResource MenuItemOpenedBackground}" DesignColor="{StaticResource OpenedColor}" />
            <c1:C1BrushBuilder x:Name="HighlightedBackground" Input="{TemplateBinding HighlightedBackground}" DesignBrush="{StaticResource MenuItemHighlightedBackground}" DesignColor="{StaticResource HighlightedColor}" />
            <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding HeaderBackground}" DesignBrush="{StaticResource MenuSubItemBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
            <c1:C1BrushBuilder x:Name="LeftPanelBackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource MenuSubItemLeftPanelBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
            <Grid x:Name="HeaderPanel">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="25" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border Grid.ColumnSpan="3" Background="{Binding ElementName=BackgroundBrush, Path=Output}" />
                <Border x:Name="LeftPanel" Background="{Binding ElementName=LeftPanelBackgroundBrush, Path=Output}" CornerRadius="{StaticResource SubItemLeftPanelCornerRadius}" />
                <Border x:Name="OpenedElement" IsHitTestVisible="False" Grid.ColumnSpan="3" Background="{Binding ElementName=OpenedBackground, Path=Output}" BorderBrush="{TemplateBinding OpenedBackground}" BorderThickness="{StaticResource MenuItemBorderThickness}" CornerRadius="{StaticResource MenuItemCornerRadius}" Visibility="Collapsed" />
                <Border x:Name="HighlightedElement" IsHitTestVisible="False" Grid.ColumnSpan="3" Background="{Binding ElementName=HighlightedBackground, Path=Output}" BorderBrush="{TemplateBinding HighlightedBackground}" BorderThickness="{StaticResource MenuItemBorderThickness}" CornerRadius="{StaticResource MenuItemCornerRadius}" Visibility="Collapsed" />
                <StackPanel Orientation="Horizontal">
                    <ContentControl x:Name="MenuIcon" MaxWidth="25" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" />
                    <CheckBox x:Name="CheckIcon" Margin="5 0 0 0" Content="" IsEnabled="False" IsChecked="True" Visibility="Collapsed" Foreground="{TemplateBinding HeaderForeground}" Style="{StaticResource MenuCheckBoxStyle}" />
                </StackPanel>
                <ContentControl Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="Left" VerticalAlignment="Center" Background="{TemplateBinding HeaderBackground}" Foreground="{TemplateBinding HeaderForeground}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                    <ContentPresenter x:Name="HeaderPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}">
                                    <ContentPresenter.RecognizesAccessKey>
                                        true
                                    </ContentPresenter.RecognizesAccessKey>
                    </ContentPresenter>
                </ContentControl>
                <Path x:Name="ExpandIcon" Grid.Column="2" Margin="2 2 4 2" Height="7" Width="4" Stretch="Fill" Fill="{TemplateBinding Foreground}" Data="M 0 0 L 3.5 3.5 L 0 7 Z" />
            </Grid>
            <Popup x:Name="SubItemsPopup" HorizontalAlignment="Right">
                <ContentControl Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" x:Name="_contentControl" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{Binding Path=BorderThickness, RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{Binding Path=BorderBrush, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource MenuListContainer}" MaxHeight="{Binding Path=SubMenuMaxHeight, RelativeSource={RelativeSource TemplatedParent}}">
                    <ItemsPresenter x:Name="SubItemsPresenter" />
                </ContentControl>
            </Popup>
            <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="{StaticResource MenuSubItemCornerRadius}" IsHitTestVisible="False" Opacity="0" Visibility="{TemplateBinding DisabledCuesVisibility}" />
        </Grid>
    </ControlTemplate>

    <!-- C1MenuItem Style when the menu item is not in the first level -->
    <Style x:Key="NonFirstLevelMenuStyle" TargetType="c1:C1MenuItem">
        <Setter Property="Template" Value="{StaticResource NonFirstLevelMenuTemplate}" />
    </Style>

 
    <!-- C1MenuItem -->
    <Style TargetType="c1:C1MenuItem">
        
        
        <Setter Property="Background" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}" />
        <Setter Property="HighlightedBackground" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="OpenedBackground" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="Padding" Value="5 1" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Template" Value="{StaticResource NonFirstLevelMenuTemplate}" />
        
        <Style.Triggers>
            <Trigger Property="IsFirstLevel" Value="true">
                <Setter Property="Template" Value="{StaticResource FirstLevelMenuTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- C1Separator -->
    <Style x:Key="MenuSeparator" TargetType="c1:C1Separator">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1Separator">
                    <Grid>
                        <Rectangle x:Name="VerticalTemplate" Fill="{TemplateBinding Background}" Width="1" Margin="2 0" />
                        <Grid x:Name="HorizontalTemplate">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="25" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <c1:C1BrushBuilder x:Name="SeparatorBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource SeparatorBrush}" DesignColor="{StaticResource BaseColor}" />
                            <c1:C1BrushBuilder x:Name="LeftZoneBackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource MenuSubItemLeftPanelBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
                            <Border x:Name="ItemLeftPanel" Height="1" Background="{Binding ElementName=LeftZoneBackgroundBrush, Path=Output}" CornerRadius="{StaticResource SubItemLeftPanelCornerRadius}" />
                            <Border Background="{Binding Output, ElementName=SeparatorBrush}" Height="1" Grid.Column="1" Margin="3 0 0 0" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1Menu -->
    <Style TargetType="c1:C1Menu">
        
        
        <Setter Property="Background" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource WpfMenuBorderBrush}" />
        <Setter Property="HighlightedBackground" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="OpenedBackground" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Foreground" Value="{StaticResource ForegroundBrushColor}" />
        <Setter Property="Padding" Value="2" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="FirstLevelStyle" Value="{StaticResource FirstLevelMenuStyle}" />
        <Setter Property="NonFirstLevelStyle" Value="{StaticResource NonFirstLevelMenuStyle}" />
        <Setter Property="SeparatorStyle" Value="{StaticResource MenuSeparator}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1Menu">
                    <Grid>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                        <Border Padding="{TemplateBinding Padding}" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{StaticResource MenuCornerRadius}">
                            <ItemsPresenter />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    

    
    

    <Style TargetType="c1:C1MenuList">
        <Setter Property="Background" Value="{StaticResource BaseColorBrush}" />
        <Setter Property="HighlightedBackground" Value="{StaticResource HightlightedColorBrush}" />
        <Setter Property="OpenedBackground" Value="{StaticResource OpenedColorBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Foreground" Value="{StaticResource ForegroundBrushColor}" />
        <Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
        <Setter Property="AutoClose" Value="True" />
        <Setter Property="DetectBoundaries" Value="True" />
        <Setter Property="Orientation" Value="Vertical" />
        <Setter Property="SeparatorStyle" Value="{StaticResource MenuSeparator}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1MenuList">
                    <Grid x:Name="MainPanel">
                        <ContentControl Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{TemplateBinding Foreground}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Style="{StaticResource MenuListContainer}" MaxHeight="{TemplateBinding SubMenuMaxHeight}">
                            <ItemsPresenter x:Name="SubItemsPresenter" />
                        </ContentControl>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
