Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ToolBar.MenuStyleKey Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the Style applied to menus on a ToolBar.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public static ResourceKey MenuStyleKey { get; }

Property Value

Type: System.Windows.ResourceKey

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

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

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

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

<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>

.NET Framework
Available since 3.0
Return to top
Show:
© 2018 Microsoft