語言

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

屬性值

一個資源鍵,代表工具列選單的預設樣式。

範例

以下範例利用此特性將 a Style 應用於 Menu 控制點 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>

備註

使用此屬性來更改 MenuToolBar.

XAML 屬性使用方式

< objectproperty=“{ToolBar.MenuStyleKey}"/>

適用於