ToolBar.TextBoxStyleKey Propriété

Définition

Obtient le Style appliqué aux zones de texte d'une ToolBar.

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

Valeur de propriété

ResourceKey

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 contrôle 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 TextBox contrôles sur le ToolBar.

Utilisation d'attributs XAML

<object property= »{ ToolBar.TextBoxStyleKey}"/>

S’applique à