ToolBar.MenuStyleKey Property

Definition

Gets the Style applied to menus on a ToolBar.

C#
public static System.Windows.ResourceKey MenuStyleKey { get; }

Property Value

A resource key that represents the default style for menus on the toolbar.

Examples

The following example uses this property to apply a Style to Menu controls on a ToolBar.

XAML
<Style x:Key="{x:Static ToolBar.MenuStyleKey}" TargetType="Menu">
  <Setter Property="FontSize" Value="14"/>
  <Setter Property="FontStyle" Value="Italic"/>
  <Setter Property="FontWeight" Value="Bold"/>
  <Setter Property="Background" Value="LightSteelBlue"/>
</Style>

Remarks

Use this property to change the default style of Menu controls on the ToolBar.

XAML Attribute Usage

<object property="{ ToolBar.MenuStyleKey}"/>

Applies to

Produk Versi
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10