FillRule Property (PathGeometry)

Gets or sets a value that determines how the intersecting areas (typically PathFigure objects, or combined geometries in a GeometryGroup) contained in this Geometry are combined.

<object FillRule="FillRule" .../>
value = object.FillRule
object.FillRule = value

Property Value


A value of the FillRule enumeration.

This property is read/write. The default value is EvenOdd.


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 or GeometryGroup. On other geometries such as RectangleGeometry, the property exists but will have no effect because there is no way in the properties of these geometries to specify segment relationships such that a fill rule behavior is relevant.

The value of IsClosed 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.

Applies To

EllipseGeometry, GeometryGroup, LineGeometry, PathGeometry, RectangleGeometry

See Also

Silverlight Geometries Overview