Partage via


ToolBar.TextBoxStyleKey Propriété

Définition

Obtient la Style appliquée aux zones de texte d’un ToolBar.

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

Valeur de propriété

Clé de ressource qui représente le style par défaut pour les zones de texte de la barre d’outils.

Exemples

L’exemple suivant utilise cette propriété pour créer un Style pour les contrôles TextBox sur un ToolBar.

<Style x:Key="{x:Static ToolBar.TextBoxStyleKey}" TargetType="TextBox">
  <Setter Property="Background" Value="DarkBlue"/>
  <Setter Property="Foreground" Value="White"/>
  <Setter Property="FontSize" Value="14"/>
  <Setter Property="FontStyle" Value="Italic"/>
  <Setter Property="HorizontalAlignment" Value="Center"/>
  <Setter Property="VerticalAlignment" Value="Center"/>
  <Setter Property="Width" Value="75"/>
</Style>

Remarques

Utilisez cette propriété pour modifier le style par défaut des contrôles TextBox sur le ToolBar.

Utilisation des attributs XAML

< propriétéobjet="{ToolBar.TextBoxStyleKey}"/>

S’applique à