Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 2.07 KB

pathsegmentcollection.md

File metadata and controls

44 lines (28 loc) · 2.07 KB
-api-id -api-type
T:Windows.UI.Xaml.Media.PathSegmentCollection
winrt class

Windows.UI.Xaml.Media.PathSegmentCollection

-description

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

-xaml-syntax

<object>
  <object.property>
    oneOrMorePathSegments
  </object.property>
</object>

-remarks

This class is relevant for setting the vector data for either a Path or a PathIcon.

Rather than creating an instance or an object element, you can also define different types of segments as part of a vector within the string for a Move and draw commands syntax.

Enumerating the collection in C# or Microsoft Visual Basic

A PathSegmentCollection is enumerable, so you can use language-specific syntax such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable<PathSegment> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable with a PathSegment constraint.

-examples

-see-also

IVector<T>, IIterable<T>, IList, Move and draw commands syntax