Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ToolBar.ButtonStyleKey Property

 

Gets the Style applied to buttons on a toolbar.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public static ResourceKey ButtonStyleKey { get; }

Property Value

Type: System.Windows.ResourceKey

A resource key that represents the default style for buttons on the toolbar.

Use this property to change the default style of Button controls on the ToolBar.

<object property="{ ToolBar.ButtonStyleKey}"/>

The following example shows how to use this property to apply a Style to Button controls on a 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>

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft