FillRule (Geometry)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Gets or sets a value that determines how the intersecting areas (typically PathFigure objects or combined geometries in a GeometryGroup) contained in a Geometry are combined.
<object FillRule="FillRule" .../>
value = object.FillRule
object.FillRule = value
Property Value
Type: FillRule
One of the enumeration values.
This property is read/write. The default value is EvenOdd.
Remarks
The fill area is determined by applying the specified rule to the entire Geometry. To give the fill a different appearance, you set a Fill value on the parent Path of the Geometry.
FillRule is mainly relevant for two types of geometries, PathGeometry and GeometryGroup. On other geometries such as RectangleGeometry, the property exists but will have no effect because there is no way to specify segment relationships so that a fill rule behavior is relevant in the properties of these geometries.
The value of the IsClosed property on a PathFigure within a PathGeometry does not affect the calculation of the fill area. It only affects whether that segment is drawn; the fill area is evaluated as if the first and last segments were connected.