다음을 통해 공유


Segments

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

XAML Values

Value

Description

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

Type: PathSegmentCollection

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

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

Managed Equivalent

Segments

Remarks

The XAML syntax for Segments is an example of an implicit collection syntax, where you can omit the PathSegmentCollection object element and 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. 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.

Applies To

PathFigure

See Also

Reference