Share via


ToolBar.CheckBoxStyleKey 屬性

定義

取得套用至 Style 上之核取方塊的 ToolBar

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

屬性值

ResourceKey

表示 ToolBar 上核取方塊之預設樣式的資源索引鍵。

範例

下列範例會使用這個屬性將 套用 StyleCheckBox 上的 ToolBar 控制項。

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

備註

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

XAML Attribute Usage

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

適用於