语言

ToolBar.RadioButtonStyleKey 属性

定义

获取 Style 应用于工具栏上的单选按钮。

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

属性值

一个资源键,表示工具栏上单选按钮的默认样式。

示例

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

<Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}" TargetType="RadioButton">
  <Setter Property="Background" Value="LightSteelBlue"/>
  <Setter Property="FontSize" Value="14"/>
  <Setter Property="HorizontalAlignment" Value="Center"/>
  <Setter Property="VerticalAlignment" Value="Center"/>
</Style>

注解

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

XAML 属性用法

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

适用于