This documentation is archived and is not being maintained.

AccessText.Foreground Property

Gets or sets the Brush that draws the text content of the element. This is a dependency property.

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

public Brush Foreground { get; set; }
For XAML information, see the Brush type.

Property Value

Type: System.Windows.Media.Brush
The Brush that draws the text. The default is Black.

The following example shows how to set properties to change the appearance of the text in an AccessText control.

<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>

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Show: