<ResourceDictionary 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c1="using:C1.Xaml">
	<ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ms-appx:///C1.UWP/themes/Common.xaml"/>
    </ResourceDictionary.MergedDictionaries>

	<!--******************** C1Menu ********************-->
    <Style TargetType="TextBlock" x:Key="ArrowStyle">
        <Setter Property="FontSize" Value="20" />
        <Setter Property="FontFamily" Value="Segoe UI Symbol" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="0 0 -2 0" />
    </Style>
    
    <Style x:Key="MenuListContainer" TargetType="ContentControl">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ContentControl">
					<Grid>
						<Border x:Name="BackgroundElement" 
							Background="{TemplateBinding Background}" 
							BorderBrush="{TemplateBinding BorderBrush}" 
							BorderThickness="{TemplateBinding BorderThickness}">
							<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>

	<!-- C1MenuItem Style when the menu item is in the first level -->
	<Style x:Key="FirstLevelMenuStyle" TargetType="c1:C1MenuItem">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1:C1MenuItem">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="Disabled">
									<Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="HExpandIcon">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="VExpandIcon">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
								</VisualState>
								<VisualState x:Name="MouseOver"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="OpenStates">
								<VisualState x:Name="Closed"/>
								<VisualState x:Name="Opened">
									<Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="HExpandIcon">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="VExpandIcon">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<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>
						<Grid x:Name="HeaderPanel">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="Auto"/>
								<ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions>
                            <Border x:Name="Background" Grid.ColumnSpan="3"	Background="{TemplateBinding Background}"/>
							<Border x:Name="OpenedElement" Grid.ColumnSpan="3"
									Background="{TemplateBinding OpenedBackground}"  
									BorderThickness="{TemplateBinding BorderThickness}" 
									BorderBrush="{TemplateBinding OpenedBackground}" 
									Visibility="Collapsed"/>
							<Border x:Name="HighlightedElement" Grid.ColumnSpan="3"
									Background="{TemplateBinding HighlightedBackground}"  
									BorderThickness="{TemplateBinding BorderThickness}" 
									BorderBrush="{TemplateBinding HighlightedBackground}" 
									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}"
									Padding="{TemplateBinding Padding}">
								<ContentPresenter
										x:Name="HeaderPresenter"
										ContentTemplate="{TemplateBinding HeaderTemplate}"/>
							</ContentControl>
                            <Path x:Name="HExpandIcon" Grid.Column="2" Margin="10 0" Height="7" Width="10" Visibility="Collapsed" Fill="{TemplateBinding HeaderForeground}" Data="M0,0 L5,5 L10,0 L10,2.75 L5,7.5 L0,2.75" VerticalAlignment="Center"/>
                            <Path x:Name="VExpandIcon" Grid.Column="2" Margin="10 0" Height="10" Width="7" Visibility="Collapsed" Fill="{TemplateBinding HeaderForeground}" Data="M 0,0 L2.75,0 L7.5,5 L2.75,10 L0,10 L5,5 z" VerticalAlignment="Center"/>
						</Grid>
						<Popup x:Name="SubItemsPopup" VerticalAlignment="Bottom">
                            <ContentControl Background="{TemplateBinding HeaderBackground}" 
												Foreground="{TemplateBinding Foreground}" 
												BorderThickness="{TemplateBinding BorderThickness}"
												BorderBrush="{TemplateBinding BorderBrush}"
												Style="{StaticResource MenuListContainer}" 
												MaxHeight="{Binding Path=SubMenuMaxHeight, RelativeSource={RelativeSource TemplatedParent}}">
								<ItemsPresenter x:Name="SubItemsPresenter"/>
							</ContentControl>
						</Popup>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</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="MinWidth" Value="0"/>
		<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>
                            <TextBlock x:Name="CheckIcon" Text="&#xE10B;" Style="{StaticResource ArrowStyle}" 
                                       Foreground="{TemplateBinding Foreground}" 
                                       Opacity="0"/>
                            <Rectangle x:Name="IndeterminateIcon" 
									Height="2" Width="6"
									Fill="{TemplateBinding Foreground}"
									Opacity="0"/>
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- C1MenuItem Style when the menu item is not in the first level -->
	<Style x:Key="NonFirstLevelMenuStyle" TargetType="c1:C1MenuItem">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1:C1MenuItem">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ExpandIcon">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="CheckIcon">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
								</VisualState>
								<VisualState x:Name="MouseOver"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="OpenStates">
								<VisualState x:Name="Closed"/>
								<VisualState x:Name="Opened">
									<Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ExpandIcon">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="CheckIcon">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <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>
						<Grid x:Name="HeaderPanel" >
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="25"/>
								<ColumnDefinition Width="*"/>
								<ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions>
							<Border x:Name="Background" Grid.ColumnSpan="3"
						Background="{TemplateBinding HeaderBackground}"/>
                            <!--<Border x:Name="LeftPanel"
							Background="{TemplateBinding Background}" />-->
							<Border x:Name="OpenedElement" IsHitTestVisible="False" Grid.ColumnSpan="3"
								Background="{TemplateBinding OpenedBackground}" 
								BorderBrush="{TemplateBinding OpenedBackground}" 
								BorderThickness="{TemplateBinding BorderThickness}"  
								Visibility="Collapsed"/>
							<Border x:Name="HighlightedElement" IsHitTestVisible="False" Grid.ColumnSpan="3"
								Background="{TemplateBinding HighlightedBackground}" 
								BorderBrush="{TemplateBinding HighlightedBackground}" 
								BorderThickness="{TemplateBinding BorderThickness}"  
								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}"
											VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
								<ContentPresenter
										x:Name="HeaderPresenter"
										ContentTemplate="{TemplateBinding HeaderTemplate}"
										/>
							</ContentControl>
                            <Path x:Name="ExpandIcon" Grid.Column="2" Margin="10 0" Height="10" Width="7" Stretch="Fill" Fill="{TemplateBinding Foreground}"
								Data="M 0,0 L2.75,0 L7.5,5 L2.75,10 L0,10 L5,5 z" />
                        </Grid>
						<Popup x:Name="SubItemsPopup" HorizontalAlignment="Right">
							<ContentControl Background="{TemplateBinding Background}" x:Name="_contentControl"
												Foreground="{TemplateBinding Foreground}" 
												BorderThickness="{TemplateBinding BorderThickness}"
												BorderBrush="{TemplateBinding BorderBrush}"
												Style="{StaticResource MenuListContainer}" 
												MaxHeight="{Binding Path=SubMenuMaxHeight, RelativeSource={RelativeSource TemplatedParent}}">
								<ItemsPresenter x:Name="SubItemsPresenter"/>
							</ContentControl>
						</Popup>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- C1MenuItem -->
	<Style TargetType="c1:C1MenuItem" BasedOn="{StaticResource NonFirstLevelMenuStyle}">
        <Setter Property="Foreground" Value="{ThemeResource ListBoxForegroundThemeBrush}"/>
        <Setter Property="Background" Value="{ThemeResource ListBoxBackgroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource ListBoxBorderThemeBrush}"/>
        <Setter Property="BorderThickness" Value="{ThemeResource ListBoxBorderThemeThickness}"/>
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
        <Setter Property="HighlightedBackground" Value="{ThemeResource ListBoxItemPointerOverBackgroundThemeBrush}"/>
        <Setter Property="OpenedBackground" Value="{ThemeResource ListBoxItemSelectedBackgroundThemeBrush}"/>
        <Setter Property="Padding" Value="8,10"/>
	</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>

                            <Border x:Name="ItemLeftPanel" Height="1" Background="{TemplateBinding BorderBrush}" />
                            <Border Background="{TemplateBinding BorderBrush}" Height="1" Grid.Column="1" Margin="3 0 0 0"/>
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- C1Menu -->
	<Style TargetType="c1:C1Menu">
        <Setter Property="Foreground" Value="{ThemeResource ListBoxForegroundThemeBrush}"/>
        <Setter Property="Background" Value="{ThemeResource ListBoxBackgroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource ListBoxBorderThemeBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
        <Setter Property="HighlightedBackground" Value="{ThemeResource ListBoxItemPointerOverBackgroundThemeBrush}"/>
        <Setter Property="OpenedBackground" Value="{ThemeResource ListBoxItemSelectedBackgroundThemeBrush}"/>
        <Setter Property="Padding" Value="0"/>
        <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>
                        <Border  BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
							<ItemsPresenter/>
						</Border>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <!--****************** C1ContextMenu ********************-->

	<!-- C1ContextMenu -->
	<Style TargetType="c1:C1ContextMenu">
        <Setter Property="Foreground" Value="{ThemeResource ListBoxForegroundThemeBrush}"/>
        <Setter Property="Background" Value="{ThemeResource ListBoxBackgroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource ListBoxBorderThemeBrush}"/>
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
        <Setter Property="HighlightedBackground" Value="{ThemeResource ListBoxItemPointerOverBackgroundThemeBrush}"/>
        <Setter Property="OpenedBackground" Value="{ThemeResource ListBoxItemSelectedBackgroundThemeBrush}"/>
        <Setter Property="BorderThickness" Value="{ThemeResource ListBoxBorderThemeThickness}"/>
        <Setter Property="AutoClose" Value="True"/>
		<Setter Property="DetectBoundaries" Value="True"/>
		<Setter Property="Orientation" Value="Vertical"/>
		<Setter Property="FirstLevelStyle" Value="{StaticResource NonFirstLevelMenuStyle}"/>
		<Setter Property="SeparatorStyle" Value="{StaticResource MenuSeparator}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1:C1ContextMenu">
					<Popup x:Name="ContextMenuPopup">
						<Canvas x:Name="PositioningPanel">
							<Grid x:Name="MainPanel">
								<ContentControl Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}"
												Foreground="{TemplateBinding Foreground}" 
												BorderThickness="{TemplateBinding BorderThickness}"
												BorderBrush="{TemplateBinding BorderBrush}"
												Width="{TemplateBinding Width}"
												Height="{TemplateBinding Height}"
												Style="{StaticResource MenuListContainer}" 
												MaxHeight="{TemplateBinding SubMenuMaxHeight}">
									<ItemsPresenter x:Name="SubItemsPresenter"/>
								</ContentControl>
							</Grid>
						</Canvas>
					</Popup>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style TargetType="c1:C1MenuList">
        <Setter Property="Foreground" Value="{ThemeResource ListBoxForegroundThemeBrush}"/>
        <Setter Property="Background" Value="{ThemeResource ListBoxBackgroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource ListBoxBorderThemeBrush}"/>
        <Setter Property="BorderThickness" Value="{ThemeResource ListBoxBorderThemeThickness}"/>
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
        <Setter Property="HighlightedBackground" Value="{ThemeResource ListBoxItemPointerOverBackgroundThemeBrush}"/>
        <Setter Property="OpenedBackground" Value="{ThemeResource ListBoxItemSelectedBackgroundThemeBrush}"/>
        <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>