Udostępnij za pośrednictwem


PathSegmentCollection

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

Represents a collection of PathSegment objects that can be individually accessed by index.

<PathSegmentCollection   ...>
  oneOrMorePathSegments
</PathSegmentCollection   ...>

XAML Values

Value

Description

oneOrMorePathSegments

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

Managed Equivalent

PathSegmentCollection

Remarks

The Segments property uses PathSegmentCollection to store PathSegment information.

PathSegmentCollection defines no methods or properties beyond the basic Collection methods and properties. Methods such as Add or GetItem will expect or return objects that are of type PathSegment. PathSegment itself is an abstract type, so this generally means that the items in a collection are one of the following:

  • ArcSegment

  • BezierSegment

  • LineSegment

  • PolyBezierSegment

  • PolyLineSegment

  • PolyQuadraticBezierSegment

  • QuadraticBezierSegment

The XAML syntax for properties that use a PathSegmentCollection is an example of implicit collection syntax, in which you can omit an actual PathSegmentCollection object element, as well as the <PathFigure.Segments> property element. 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.

For more information on basic concepts, see Geometries. Note that the Geometries topic is written primarily for users of the managed API, and may not have code examples or specific information that address the JavaScript API scenarios.