ToolBar.ButtonStyleKey 屬性

定義

取得套用至工具列上按鈕的 Style

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

屬性值

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

範例

下列範例示範如何使用這個屬性將 套用 StyleButton 上的 ToolBar 控制項。

<Style x:Key="{x:Static ToolBar.ButtonStyleKey}" TargetType="Button">
  <Setter Property="Foreground" Value="Blue"/>
  <Setter Property="FontSize" Value="14"/>
  <Setter Property="HorizontalAlignment" Value="Center"/>
  <Setter Property="VerticalAlignment" Value="Center"/>
</Style>

備註

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

XAML Attribute Usage

<objectproperty=「 {ToolBar.ButtonStyleKey}"/>

適用於