Glyphs.Fill Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the Brush that is used to render the glyphs.

Namespace:  System.Windows.Documents
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Property Fill As Brush
public Brush Fill { get; set; }
<Glyphs ...>
  <Glyphs.Fill>
    singleBrush
  </Glyphs.Fill>
</Glyphs>
<Glyphs Fill="colorString"/>

XAML Values

Property Value

Type: System.Windows.Media.Brush
The brush to use to render the glyphs. The default is nulla null reference (Nothing in Visual Basic), which is evaluated as Transparent for rendering.

Remarks

Dependency property identifier field: FillProperty

Glyphs that fill with the default nulla null reference (Nothing in Visual Basic) setting cannot be hit-tested. Glyphs that fill with the Transparent setting can be hit-tested.

The first XAML syntax shown is an attribute syntax. Use this syntax when you want the Fill to be a SolidColorBrush, which can be expressed as its Color value, for example "Red" or "#FF0000".

The second XAML syntax shown is a property element syntax. Use this syntax when you want the Fill to be a more complex brush than a SolidColorBrush, such as ImageBrush, LinearGradientBrush, or RadialGradientBrush.

NoteNote:

The default Fill is nulla null reference (Nothing in Visual Basic). Therefore in order to render anything with Glyphs you should specify a Fill either in XAML or script. This is in contrast to Foreground, which defaults to Transparent.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.