1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
|
<!-- Menu, MenuItem ControlTemplates -->
<Geometry x:Key="Checkmark">M 0,5.1 L 1.7,5.2 L 3.4,7.1 L 8,0.4 L 9.2,0 L 3.3,10.8 Z</Geometry>
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
<Grid SnapsToDevicePixels="true">
<Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="2" RadiusY="2" x:Name="Bg" />
<Rectangle RadiusX="2" RadiusY="2" Margin="1" x:Name="InnerBorder" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="24" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" />
<ColumnDefinition Width="4" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="37" />
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
<ColumnDefinition Width="17" />
</Grid.ColumnDefinitions>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="1" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon" />
<Border Visibility="Hidden" Margin="1" x:Name="GlyphPanel" Width="22" Height="22" Background="#E6EFF4" BorderBrush="#CDD3E6" BorderThickness="1" CornerRadius="3">
<Path Fill="#0C12A1" FlowDirection="LeftToRight" x:Name="Glyph" Width="9" Height="11" Data="{StaticResource Checkmark}" />
</Border>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Grid.Column="2" ContentSource="Header" RecognizesAccessKey="True" />
<TextBlock Margin="{TemplateBinding Padding}" Text="{TemplateBinding InputGestureText}" Grid.Column="4" />
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Icon" Value="{x:Null}">
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsHighlighted" Value="true">
<Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Brush_ToolBarMouseOverBackground}" />
<Setter Property="Stroke" TargetName="Bg" Value="{DynamicResource Brush_ToolBarButtonBorder}" />
<Setter Property="Stroke" TargetName="InnerBorder" Value="#40FFFFFF" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="#FF9A9A9A" />
<Setter Property="Background" TargetName="GlyphPanel" Value="#EEE9E9" />
<Setter Property="BorderBrush" TargetName="GlyphPanel" Value="#DBD6D6" />
<Setter Property="Fill" TargetName="Glyph" Value="#848589" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter" />
<Style x:Key="MenuScrollButton" BasedOn="{x:Null}" TargetType="{x:Type RepeatButton}">
<Setter Property="ClickMode" Value="Hover" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<DockPanel SnapsToDevicePixels="true" Background="Transparent">
<Rectangle Fill="Transparent" x:Name="R1" Width="1" DockPanel.Dock="Right" />
<Rectangle Fill="Transparent" x:Name="B1" Height="1" DockPanel.Dock="Bottom" />
<Rectangle Fill="Transparent" x:Name="L1" Width="1" DockPanel.Dock="Left" />
<Rectangle Fill="Transparent" x:Name="T1" Height="1" DockPanel.Dock="Top" />
<ContentPresenter HorizontalAlignment="Center" Margin="2,2,2,2" x:Name="ContentContainer" VerticalAlignment="Center" />
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Fill" TargetName="R1" Value="{StaticResource {x:Static SystemColors.ControlLightLightBrushKey}}" />
<Setter Property="Fill" TargetName="B1" Value="{StaticResource {x:Static SystemColors.ControlLightLightBrushKey}}" />
<Setter Property="Fill" TargetName="L1" Value="{StaticResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" />
<Setter Property="Fill" TargetName="T1" Value="{StaticResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" />
<Setter Property="Margin" TargetName="ContentContainer" Value="3,3,1,1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Geometry x:Key="UpArrow">M 0,4 L 3.5,0 L 7,4 Z</Geometry>
<Geometry x:Key="DownArrow">M 0,0 L 3.5,4 L 7,0 Z</Geometry>
<Style x:Key="{ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}" BasedOn="{x:Null}" TargetType="{x:Type ScrollViewer}">
<Setter Property="HorizontalScrollBarVisibility" Value="Hidden" />
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Grid SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border Grid.Column="0" Grid.Row="1">
<ScrollContentPresenter Margin="{TemplateBinding Padding}" />
</Border>
<RepeatButton Focusable="false" Style="{StaticResource MenuScrollButton}" Command="{x:Static ScrollBar.LineUpCommand}"
CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandTarget}"
Grid.Column="0" Grid.Row="0">
<RepeatButton.Visibility>
<MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
<Binding Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding>
</RepeatButton.Visibility>
<Path Fill="{StaticResource {x:Static SystemColors.MenuTextBrushKey}}" Data="{StaticResource UpArrow}" />
</RepeatButton>
<RepeatButton Focusable="false" Style="{StaticResource MenuScrollButton}" Command="{x:Static ScrollBar.LineDownCommand}"
CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandTarget}"
Grid.Column="0" Grid.Row="2">
<RepeatButton.Visibility>
<MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
<Binding Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding>
</RepeatButton.Visibility>
<Path Fill="{StaticResource {x:Static SystemColors.MenuTextBrushKey}}" Data="{StaticResource DownArrow}" />
</RepeatButton>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}" TargetType="{x:Type ContentControl}">
<Border Background="#F5F5F5" BorderBrush="#FF959595" BorderThickness="1">
<Grid>
<Rectangle Fill="#f1f1f1" RadiusX="2" RadiusY="2" HorizontalAlignment="Left" Margin="2" Width="25" />
<Rectangle Fill="#E2E3E3" HorizontalAlignment="Left" Margin="26,2,0,2" Width="1" />
<Rectangle Fill="White" HorizontalAlignment="Left" Margin="27,2,0,2" Width="1" />
<ContentPresenter Margin="1,0" Grid.ColumnSpan="2" />
</Grid>
</Border>
</ControlTemplate>
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
<Grid SnapsToDevicePixels="true">
<Rectangle RadiusX="2" RadiusY="2" x:Name="OuterBorder" />
<Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" x:Name="Bg" />
<Rectangle Margin="2" x:Name="InnerBorder" />
<DockPanel>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon" />
<Path Visibility="Collapsed" Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" Margin="7,0,0,0" x:Name="GlyphPanel" VerticalAlignment="Center" Data="{StaticResource Checkmark}" />
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" ContentSource="Header" RecognizesAccessKey="True" />
</DockPanel>
<Popup Focusable="false" AllowsTransparency="true" HorizontalOffset="1" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{StaticResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-1" x:Name="PART_Popup">
<Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent">
<ContentControl x:Name="SubMenuBorder" IsTabStop="false" Template="{StaticResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}">
<ScrollViewer Style="{StaticResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" CanContentScroll="true">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0" Grid.IsSharedSizeScope="true" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle" />
</ScrollViewer>
</ContentControl>
</Microsoft_Windows_Themes:SystemDropShadowChrome>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
<Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None" />
</Trigger>
<Trigger Property="Icon" Value="{x:Null}">
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5" />
<Setter Property="Color" TargetName="Shdw" Value="#71000000" />
</Trigger>
<Trigger Property="IsHighlighted" Value="true">
<Setter Property="Stroke" TargetName="Bg" Value="{DynamicResource Brush_ToolBarButtonBorder}" />
<Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Brush_ToolBarMouseOverBackground}" />
<Setter Property="Stroke" TargetName="OuterBorder" Value="#50FFFFFF" />
<Setter Property="Stroke" TargetName="InnerBorder" Value="#50FFFFFF" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="Stroke" TargetName="Bg" Value="{DynamicResource Brush_ToolBarButtonBorder}" />
<Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Brush_ToolBarMouseOverBackground}" />
<Setter Property="Stroke" TargetName="InnerBorder" Value="#50747272" />
</Trigger>
<Trigger Property="IsSubmenuOpen" Value="true">
<Setter Property="Stroke" TargetName="Bg" Value="{DynamicResource Brush_ToolBarButtonBorder}" />
<Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Brush_ToolBarButtonPressed}" />
<Setter Property="Stroke" TargetName="InnerBorder" Value="#50747272" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="#FF9A9A9A" />
<Setter Property="Fill" TargetName="GlyphPanel" Value="#848589" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="ComponentResourceKey2" TargetType="{x:Type MenuItem}">
<Grid SnapsToDevicePixels="true">
<Rectangle RadiusX="2" RadiusY="2" x:Name="OuterBorder" />
<Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" x:Name="Bg" />
<Rectangle Margin="2" x:Name="InnerBorder" />
<DockPanel>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon" />
<Path Visibility="Collapsed" Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" Margin="7,0,0,0" x:Name="GlyphPanel" VerticalAlignment="Center" Data="{StaticResource Checkmark}" />
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" ContentSource="Header" RecognizesAccessKey="True" />
</DockPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Icon" Value="{x:Null}">
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsHighlighted" Value="true">
<Setter Property="Stroke" TargetName="Bg" Value="{DynamicResource Brush_ToolBarButtonBorder}" />
<Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Brush_ToolBarMouseOverBackground}" />
<Setter Property="Stroke" TargetName="OuterBorder" Value="#50FFFFFF" />
<Setter Property="Stroke" TargetName="InnerBorder" Value="#50FFFFFF" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="Stroke" TargetName="Bg" Value="{DynamicResource Brush_ToolBarButtonBorder}" />
<Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Brush_ToolBarMouseOverBackground}" />
<Setter Property="Stroke" TargetName="InnerBorder" Value="#50747272" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="#FF9A9A9A" />
<Setter Property="Fill" TargetName="GlyphPanel" Value="#848589" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry>
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
<Grid SnapsToDevicePixels="true">
<Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="2" RadiusY="2" x:Name="Bg" />
<Rectangle Stroke="Transparent" StrokeThickness="1" RadiusX="2" RadiusY="2" Margin="1" x:Name="InnerBorder" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="24" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" />
<ColumnDefinition Width="4" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="37" />
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
<ColumnDefinition Width="17" />
</Grid.ColumnDefinitions>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="1" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon" />
<Border Visibility="Hidden" Margin="1" x:Name="GlyphPanel" Width="22" Height="22" Background="#E6EFF4" BorderBrush="#CDD3E6" BorderThickness="1" CornerRadius="3">
<Path Fill="#0C12A1" FlowDirection="LeftToRight" x:Name="Glyph" Width="9" Height="11" Data="{StaticResource Checkmark}" />
</Border>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Grid.Column="2" ContentSource="Header" RecognizesAccessKey="True" />
<TextBlock Visibility="Collapsed" Margin="{TemplateBinding Padding}" Text="{TemplateBinding InputGestureText}" Grid.Column="4" />
<Path Fill="{TemplateBinding Foreground}" Margin="4,0,0,0" VerticalAlignment="Center" Grid.Column="5" Data="{StaticResource RightArrow}" />
</Grid>
<Popup Focusable="false" AllowsTransparency="true" HorizontalOffset="-2" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PopupAnimation="{StaticResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-3" x:Name="PART_Popup">
<Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent">
<ContentControl x:Name="SubMenuBorder" IsTabStop="false" Template="{StaticResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}">
<ScrollViewer Style="{StaticResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" CanContentScroll="true">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0" Grid.IsSharedSizeScope="true" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle" />
</ScrollViewer>
</ContentControl>
</Microsoft_Windows_Themes:SystemDropShadowChrome>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
<Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None" />
</Trigger>
<Trigger Property="IsHighlighted" Value="true">
<Setter Property="Stroke" TargetName="InnerBorder" Value="#D1DBF4FF" />
</Trigger>
<Trigger Property="Icon" Value="{x:Null}">
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5" />
<Setter Property="Color" TargetName="Shdw" Value="#71000000" />
</Trigger>
<Trigger Property="IsHighlighted" Value="true">
<Setter Property="Stroke" TargetName="Bg" Value="{DynamicResource Brush_ToolBarButtonBorder}" />
<Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Brush_ToolBarMouseOverBackground}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="#FF9A9A9A" />
<Setter Property="Background" TargetName="GlyphPanel" Value="#EEE9E9" />
<Setter Property="BorderBrush" TargetName="GlyphPanel" Value="#DBD6D6" />
<Setter Property="Fill" TargetName="Glyph" Value="#848589" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template" Value="{StaticResource {ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
<Style.Triggers>
<Trigger Property="Role" Value="TopLevelHeader">
<Setter Property="Padding" Value="3,3,8,3" />
<Setter Property="Template" Value="{StaticResource {ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
</Trigger>
<Trigger Property="Role" Value="TopLevelItem">
<Setter Property="Padding" Value="3,3,8,3" />
<Setter Property="Template" Value="{StaticResource ComponentResourceKey2}" />
</Trigger>
<Trigger Property="Role" Value="SubmenuHeader">
<Setter Property="Padding" Value="2,3,2,3" />
<Setter Property="Template" Value="{StaticResource {ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
</Trigger>
<Trigger Property="Role" Value="SubmenuItem">
<Setter Property="Padding" Value="2,3,2,3" />
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type Menu}">
<Setter Property="Background" Value="{x:Null}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush_DarkBackground}" />
<Setter Property="Foreground" Value="{DynamicResource Brush_MenuTopLevelTextForeground}" />
</Style> |
Partager