ToolBar.MenuStyleKey 屬性

定義

取得套用至 Style 上之功能表的 ToolBar

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

屬性值

ResourceKey

表示工具列上功能表之預設樣式的資源索引鍵。

範例

下列範例會使用這個屬性將 套用 StyleMenu 上的 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>

備註

使用這個屬性來變更 上 ToolBar 控制項的預設樣式 Menu

XAML Attribute Usage

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

適用於