Segments Property

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

XAML
<PathFigure ...>
  oneOrMorePathSegments
</PathFigure>
Scripting
value = object.Segments
object.Segments = value

XAML Values

oneOrMorePathSegments One or more object elements that derive from PathSegment. These can be one or more of the following: ArcSegment, BezierSegment, LineSegment, PolyBezierSegment, PolyQuadraticBezierSegment, QuadraticBezierSegment.

Property Value

PathSegmentsCollection

The collection of segments that define the shape of this PathFigure object.

This property is read/write. The default value is an empty collection.

Remarks

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 Syntax Overview. (Explicitly including a PathSegmentCollection object element is permissible XAML syntax, and might be useful if you intend to name the collection in XAML and manipulate its contents through script 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 Object.)

Applies To

PathFigure

See Also

Silverlight Geometries Overview
Path Markup Syntax
PathGeometry

Community Additions

Show: