AccessText.Foreground Właściwość

Definicja

Pobiera lub ustawia element Brush , który rysuje zawartość tekstowa elementu.

public:
 property System::Windows::Media::Brush ^ Foreground { System::Windows::Media::Brush ^ get(); void set(System::Windows::Media::Brush ^ value); };
public System.Windows.Media.Brush Foreground { get; set; }
member this.Foreground : System.Windows.Media.Brush with get, set
Public Property Foreground As Brush

Wartość właściwości

Brush

Element Brush , który rysuje tekst. Wartość domyślna to Black.

Przykłady

W poniższym przykładzie pokazano, jak ustawić właściwości w celu zmiany wyglądu tekstu w kontrolce AccessText .

<TextBox Name="textBox2" Width="50" Height="30"/>
<Label Target="{Binding ElementName=textBox2}">
  <AccessText Background="Red" Foreground="DarkSlateBlue"    
              FontFamily="Arial Narrow" FontSize="16" FontStyle="Italic" 
              FontWeight="Bold">
    E_dit
  </AccessText>
</Label>

Uwagi

Informacje dotyczące właściwości zależności

Pole identyfikatora ForegroundProperty
Właściwości metadanych ustawione na true AffectsRender, SubPropertiesDoNotAffectRender, Inherits

Dotyczy

Zobacz też