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 上的复选框的默认样式。

示例

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

<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 属性用法

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

适用于