ToolBar.ButtonStyleKey Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le Style appliqué aux boutons d'une barre d'outils.
public:
static property System::Windows::ResourceKey ^ ButtonStyleKey { System::Windows::ResourceKey ^ get(); };
public static System.Windows.ResourceKey ButtonStyleKey { get; }
member this.ButtonStyleKey : System.Windows.ResourceKey
Public Shared ReadOnly Property ButtonStyleKey As ResourceKey
Valeur de propriété
Clé de ressource qui représente le style par défaut des boutons de la barre d'outils.
Exemples
L’exemple suivant montre comment utiliser cette propriété pour appliquer un Style contrôle Button sur un 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>
Remarques
Utilisez cette propriété pour modifier le style par défaut des Button contrôles sur le ToolBar.
Utilisation d'attributs XAML
<object property= »{
ToolBar.ButtonStyleKey}"/>