Segments Property
Collapse the table of content
Expand the table of content

PathFigure.Segments Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)
XMLNS for XAML: Not mapped to an xmlns.

'Declaration
Public Property Segments As PathSegmentCollection
<PathFigure>
  oneOrMorePathSegments
</PathFigure>

XAML Values

oneOrMorePathSegments

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 for Windows Phone 8. (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.)

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft