ToolBar.ButtonStyleKey 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
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
属性值
一个资源键,表示工具栏上按钮的默认样式。
示例
以下示例演示如何使用此属性将控件 Style 应用于 Button 控件 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>
注解
XAML 属性用法
<
object属性=“{ToolBar.ButtonStyleKey}"/>