Export (0) Print
Expand All
Key
M11
M12
M21
M22
Tag
Uri
X1
X2
Y1
Y2
Expand Minimize

Fill (Glyphs)

Silverlight

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

<object Fill="colorString"  .../>
-or-
<object>
  <object.Fill>
    singleBrush
  </object.Fill>
</object>
value = object.Fill
object.Fill = value

Value

Description

colorString

The Color for a SolidColorBrush expressed as an attribute string. This can be a named color, an RGB value, or an ScRGB value. RGB or ScRGB may also specify alpha information. See the "colorString Grammar" section in the Color reference topic.

singleBrush

Within opening and closing property elements for object.Fill, exactly one object element for an object that derives from Brush. The object element can be one of the following: LinearGradientBrush, RadialGradientBrush, ImageBrush, SolidColorBrush, VideoBrush.

Type: Brush

A value of type Brush.

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

The first XAML syntax shown at the beginning of this topic is an attribute syntax. Use this syntax if 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 if you want the Fill to be a more complex brush than a SolidColorBrush, such as ImageBrush, LinearGradientBrush, or RadialGradientBrush.

If you are setting this property in script, the most common technique is to use the colorString grammar to specify the value as a string. Alternatively, you might set the value to an object such as LinearGradientBrush, by specifying the XAML that defines the brush as the input for CreateFromXaml and setting Fill to the CreateFromXAML output.

Note that the default Fill is null. Therefore, 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.

Community Additions

ADD
Show:
© 2014 Microsoft