PathFigure.Segments Property

Gets or sets the collection of segments that define the shape of this PathFigure object.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

public PathSegmentCollection Segments { get; set; }

XAML Values


One or more object elements that derive from PathSegment: typically these are ArcSegment, BezierSegment, LineSegment, PolyBezierSegment, PolyQuadraticBezierSegment, or QuadraticBezierSegment. Object elements defined here become members of the PathSegmentCollection when code accesses the Segments property at run time.

Property Value

Type: System.Windows.Media.PathSegmentCollection
The collection of segments that define the shape of this PathFigure object. The default is an empty collection.

Dependency property identifier field: SegmentsProperty

The XAML syntax for Segments is an example of an implicit collection syntax, where you can omit the PathSegmentCollection object element, as well as the PathFigure.Segments property element. Instead, you generally include one or more path segment object elements (ArcSegment, BezierSegment, LineSegment, PolyBezierSegment, PolyQuadraticBezierSegment and QuadraticBezierSegment) as child elements of a PathSegment. For more information about XAML implicit collection syntax, see XAML Overview. (Explicitly including a PathSegmentCollection object element is permissible XAML syntax because this is a read-write collection property, and might be useful if you intend to name the collection in XAML and manipulate its contents through code later. Including the PathFigure.Segments property element might also be useful for markup clarity, because of the nested Figures and Segments collections found in a typical complex PathGeometry.)


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions