Fill Property (Glyphs)

Gets the sets the Brush that is used for the fill of the Glyphs.

XAML
<object Fill="Brush" .../>
-or-
<object>
  <object.Fill>
    <Brush .../>
  </object.Fill>
</object>
Scripting
value = object.Fill
object.Fill = value

Property Value

Brush

A value of type Brush.

This property is read/write. The default value is a null Brush, which is evaluated as Transparent.

Remarks

The first XAML syntax shown is an attribute syntax. You would use this syntax if you wanted 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. You would use this syntax if you wanted the Fill to be a more complex brush than a SolidColorBrush, such as ImageBrush, LinearGradientBrush or RadialGradientBrush.

Note that the default Fill is null. Therefore in order to render anything with Glyphs you should specify a Fill either in XAML or script. This is in contrast to TextBlock.Foreground, which defaults to Black.

Applies To

Glyphs

See Also

Silverlight Brushes Overview
Text and Fonts Overview
TextBlock