Fill Property (Shape)
Gets or sets the Brush that specifies how to paint the interior of the shape.
value = object.Fill
object.Fill = value
|Color||The Color for a SolidColorBrush expressed as an attribute string. See Color.|
|Brush||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.|
The Brush that describes how the interior of the shape is painted.
This property is read/write. The default value is null. See Remarks.
For rendering, the null default value is interpreted as a Brush that has no color value, but renders as Transparent. A value of a null Brush has no hit-testable region, while a value of an actual brush with a color value of Transparent is hit-testable.
Some brush types (SolidColorBrush) support a XAML attribute syntax, whereas other brush types (ImageBrush, LinearGradientBrush, RadialGradientBrush) only support an object element syntax. This is why two versions of XAML syntax are shown for this property.
When animating a Fill, you must use indirect targeting. For instance, if you are animating the color of a SolidColorBrush that is the Fill of a Rectangle, the syntax would be
<ColorAnimation ... Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" />.
If a Fill is null (or not specified), there is no hit-testable region within the object.