ToolBar.MenuStyleKey 属性

定义

Style获取应用于菜单的 ToolBar.

public:
 static property System::Windows::ResourceKey ^ MenuStyleKey { System::Windows::ResourceKey ^ get(); };
public static System.Windows.ResourceKey MenuStyleKey { get; }
static member MenuStyleKey : System.Windows.ResourceKey
Public Shared ReadOnly Property MenuStyleKey As ResourceKey

属性值

一个资源键,表示工具栏上菜单的默认样式。

示例

以下示例使用此属性对控件Style应用 MenuToolBar

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

注解

使用此属性可更改控件的默认Menu样式ToolBar

XAML 属性用法

< object属性=“{ToolBar.MenuStyleKey}"/>

适用于