<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Keep this menu independent of the application menu template: its shadow effect
paints beyond rounded corners and is clipped by the ContextMenu popup. -->
<Style x:Key="QuickSearchMenuItemStyle" TargetType="MenuItem">
<Setter Property="Foreground" Value="#414156"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="MinHeight" Value="32"/>
<Setter Property="Padding" Value="10,7"/>
<Setter Property="Margin" Value="0,1"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="MenuItem">
<Grid>
<Border x:Name="ItemSurface" Background="{TemplateBinding Background}"
CornerRadius="8" Padding="{TemplateBinding Padding}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid x:Name="IconSlot" Width="16" Margin="0,0,8,0">
<ContentPresenter x:Name="IconPresenter" ContentSource="Icon" VerticalAlignment="Center"/>
<TextBlock x:Name="CheckMark" Text="✓" VerticalAlignment="Center" Visibility="Collapsed"/>
</Grid>
<ContentPresenter Grid.Column="1" ContentSource="Header" RecognizesAccessKey="True" VerticalAlignment="Center"/>
<TextBlock x:Name="GestureHint" Grid.Column="2" Text="{TemplateBinding InputGestureText}" Margin="16,0,0,0"
Foreground="#9292AC" VerticalAlignment="Center"/>
<TextBlock x:Name="SubmenuArrow" Grid.Column="3" Text="›" FontSize="16"
Margin="10,0,0,0" VerticalAlignment="Center" Visibility="Collapsed"/>
</Grid>
</Border>
<Popup x:Name="PART_Popup" Placement="Right" Focusable="False" AllowsTransparency="True"
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
PopupAnimation="None">
<Border Background="#FAFAFF" BorderBrush="#C9C9EB" BorderThickness="1"
CornerRadius="12" Padding="6,7" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
</Border>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="ItemSurface" Property="Background" Value="#E9E9FB"/>
<Setter Property="Foreground" Value="#6868BF"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="ItemSurface" Property="Background" Value="#E9E9FB"/>
<Setter Property="Foreground" Value="#6868BF"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.45"/>
<Setter Property="Cursor" Value="Arrow"/>
</Trigger>
<Trigger Property="HasItems" Value="True">
<Setter TargetName="SubmenuArrow" Property="Visibility" Value="Visible"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
<Setter TargetName="IconPresenter" Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="Icon" Value="{x:Null}">
<Setter TargetName="IconPresenter" Property="Visibility" Value="Collapsed"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Icon" Value="{x:Null}"/>
<Condition Property="IsCheckable" Value="False"/>
</MultiTrigger.Conditions>
<Setter TargetName="IconSlot" Property="Visibility" Value="Collapsed"/>
</MultiTrigger>
<Trigger Property="InputGestureText" Value="">
<Setter TargetName="GestureHint" Property="Visibility" Value="Collapsed"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="QuickSearchSeparatorStyle" TargetType="Separator">
<Setter Property="Height" Value="1"/>
<Setter Property="Margin" Value="8,5"/>
<Setter Property="Background" Value="#E4E4F3"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Separator">
<Border Height="1" Background="{TemplateBinding Background}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="QuickSearchContextMenuStyle" TargetType="ContextMenu">
<Style.Resources>
<Style TargetType="MenuItem" BasedOn="{StaticResource QuickSearchMenuItemStyle}"/>
<Style TargetType="Separator" BasedOn="{StaticResource QuickSearchSeparatorStyle}"/>
<!-- MenuBase assigns this special resource key to Separator containers. -->
<Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="Separator"
BasedOn="{StaticResource QuickSearchSeparatorStyle}"/>
</Style.Resources>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="#C9C9EB"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="6,7"/>
<Setter Property="MinWidth" Value="174"/>
<Setter Property="HasDropShadow" Value="False"/>
<Setter Property="Effect" Value="{x:Null}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContextMenu">
<Border x:Name="MenuSurface" Background="#FAFAFF" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="12"
Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ContextMenu" BasedOn="{StaticResource QuickSearchContextMenuStyle}"/>
</ResourceDictionary>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Keep this menu independent of the application menu template: its shadow effect
paints beyond rounded corners and is clipped by the ContextMenu popup. -->
<Style x:Key="QuickSearchMenuItemStyle" TargetType="MenuItem">
<Setter Property="Foreground" Value="#414156"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="MinHeight" Value="32"/>
<Setter Property="Padding" Value="10,7"/>
<Setter Property="Margin" Value="0,1"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="MenuItem">
<Grid>
<Border x:Name="ItemSurface" Background="{TemplateBinding Background}"
CornerRadius="8" Padding="{TemplateBinding Padding}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid x:Name="IconSlot" Width="16" Margin="0,0,8,0">
<ContentPresenter x:Name="IconPresenter" ContentSource="Icon" VerticalAlignment="Center"/>
<TextBlock x:Name="CheckMark" Text="✓" VerticalAlignment="Center" Visibility="Collapsed"/>
</Grid>
<ContentPresenter Grid.Column="1" ContentSource="Header" RecognizesAccessKey="True" VerticalAlignment="Center"/>
<TextBlock x:Name="GestureHint" Grid.Column="2" Text="{TemplateBinding InputGestureText}" Margin="16,0,0,0"
Foreground="#9292AC" VerticalAlignment="Center"/>
<TextBlock x:Name="SubmenuArrow" Grid.Column="3" Text="›" FontSize="16"
Margin="10,0,0,0" VerticalAlignment="Center" Visibility="Collapsed"/>
</Grid>
</Border>
<Popup x:Name="PART_Popup" Placement="Right" Focusable="False" AllowsTransparency="True"
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
PopupAnimation="None">
<Border Background="#FAFAFF" BorderBrush="#C9C9EB" BorderThickness="1"
CornerRadius="12" Padding="6,7" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
</Border>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="ItemSurface" Property="Background" Value="#E9E9FB"/>
<Setter Property="Foreground" Value="#6868BF"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="ItemSurface" Property="Background" Value="#E9E9FB"/>
<Setter Property="Foreground" Value="#6868BF"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.45"/>
<Setter Property="Cursor" Value="Arrow"/>
</Trigger>
<Trigger Property="HasItems" Value="True">
<Setter TargetName="SubmenuArrow" Property="Visibility" Value="Visible"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
<Setter TargetName="IconPresenter" Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="Icon" Value="{x:Null}">
<Setter TargetName="IconPresenter" Property="Visibility" Value="Collapsed"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Icon" Value="{x:Null}"/>
<Condition Property="IsCheckable" Value="False"/>
</MultiTrigger.Conditions>
<Setter TargetName="IconSlot" Property="Visibility" Value="Collapsed"/>
</MultiTrigger>
<Trigger Property="InputGestureText" Value="">
<Setter TargetName="GestureHint" Property="Visibility" Value="Collapsed"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="QuickSearchSeparatorStyle" TargetType="Separator">
<Setter Property="Height" Value="1"/>
<Setter Property="Margin" Value="8,5"/>
<Setter Property="Background" Value="#E4E4F3"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Separator">
<Border Height="1" Background="{TemplateBinding Background}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="QuickSearchContextMenuStyle" TargetType="ContextMenu">
<Style.Resources>
<Style TargetType="MenuItem" BasedOn="{StaticResource QuickSearchMenuItemStyle}"/>
<Style TargetType="Separator" BasedOn="{StaticResource QuickSearchSeparatorStyle}"/>
<!-- MenuBase assigns this special resource key to Separator containers. -->
<Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="Separator"
BasedOn="{StaticResource QuickSearchSeparatorStyle}"/>
</Style.Resources>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="#C9C9EB"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="6,7"/>
<Setter Property="MinWidth" Value="174"/>
<Setter Property="HasDropShadow" Value="False"/>
<Setter Property="Effect" Value="{x:Null}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContextMenu">
<Border x:Name="MenuSurface" Background="#FAFAFF" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="12"
Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ContextMenu" BasedOn="{StaticResource QuickSearchContextMenuStyle}"/>
</ResourceDictionary>