Partilhar via


PathFigure.Segments Property

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

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)

Syntax

'Declaration
Public Property Segments As PathSegmentCollection
public PathSegmentCollection Segments { get; set; }
<PathFigure>
  oneOrMorePathSegments
</PathFigure>

XAML Values

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.

Remarks

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.)

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

Platforms

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