语言

ToolBar.CheckBoxStyleKey 属性

定义

获取应用于 Style 复选框的 ToolBar。

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

属性值

一个资源键,表示复选框的默认 ToolBar样式。

示例

以下示例使用此属性对控件Style应用 CheckBoxToolBar 。

<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>

注解

使用此属性可更改控件的默认CheckBox样式ToolBar。

XAML 属性用法

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

适用于