PathSegmentCollection PathSegmentCollection PathSegmentCollection Class

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

Syntax

Declaration

public sealed class PathSegmentCollectionpublic sealed class PathSegmentCollectionPublic NotInheritable Class PathSegmentCollection
<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<T> with a PathSegment constraint.

Constructors summary

Initializes a new instance of the PathSegmentCollection class.

Properties summary

Gets the size (count) of the collection.

Methods summary

Adds a new item to the collection.

Removes all items from the collection.

Returns an iterator for the items in the collection.

Returns the item located at the specified index.

Retrieves multiple elements in a single pass through the iterator.

Gets an immutable view into the collection.

Retrieves the index of the specified item.

Inserts the specified item at the specified index.

Removes the item at the specified index.

Removes the last item in the collection.

Initially clears the collection, then inserts the provided array as new items.

Sets the value at the specified index to the PathSegment value specified.

Constructors

  • PathSegmentCollection()
    PathSegmentCollection()
    PathSegmentCollection()
    PathSegmentCollection()

    Initializes a new instance of the PathSegmentCollection class.

    public PathSegmentCollection()public PathSegmentCollection()Public Function PathSegmentCollection() As

Properties

  • Size
    Size
    Size
    Size

    Gets the size (count) of the collection.

    public uint Size { get; }public uint Size { get; }Public ReadOnly Property Size As uint

    Property Value

    • uint
      uint
      uint

      The count of items in the collection.

Methods

  • Append(Windows.UI.Xaml.Media.PathSegment)
    Append(Windows.UI.Xaml.Media.PathSegment)
    Append(Windows.UI.Xaml.Media.PathSegment)
    Append(Windows.UI.Xaml.Media.PathSegment)

    Adds a new item to the collection.

    public void Append(Windows.UI.Xaml.Media.PathSegment)public void Append(Windows.UI.Xaml.Media.PathSegment)Public Function Append(Windows.UI.Xaml.Media.PathSegment) As void

    Parameters

  • Clear()
    Clear()
    Clear()
    Clear()

    Removes all items from the collection.

    public void Clear()public void Clear()Public Function Clear() As void
  • First()
    First()
    First()
    First()

    Returns an iterator for the items in the collection.

    public IIterator<PathSegment> First()public IIterator<PathSegment> First()Public Function First() As IIterator( Of PathSegment )

    Returns

    • The iterator. The iterator's current position is the 0-index position, or at the collection end if the collection is empty.

  • GetAt(System.UInt32)
    GetAt(System.UInt32)
    GetAt(System.UInt32)
    GetAt(System.UInt32)

    Returns the item located at the specified index.

    public PathSegment GetAt(System.UInt32)public PathSegment GetAt(System.UInt32)Public Function GetAt(System.UInt32) As PathSegment

    Parameters

    • index
      System.UInt32
      System.UInt32
      System.UInt32

      The integer index for the value to retrieve.

    Returns

  • GetMany(System.UInt32,Windows.UI.Xaml.Media.PathSegment[])
    GetMany(System.UInt32,Windows.UI.Xaml.Media.PathSegment[])
    GetMany(System.UInt32,Windows.UI.Xaml.Media.PathSegment[])
    GetMany(System.UInt32,Windows.UI.Xaml.Media.PathSegment[])

    Retrieves multiple elements in a single pass through the iterator.

    public uint GetMany(System.UInt32,Windows.UI.Xaml.Media.PathSegment[])public uint GetMany(System.UInt32,Windows.UI.Xaml.Media.PathSegment[])Public Function GetMany(System.UInt32,Windows.UI.Xaml.Media.PathSegment[]) As uint

    Parameters

    • startIndex
      System.UInt32
      System.UInt32
      System.UInt32

      The index from which to start retrieval.

    • items
      Windows.UI.Xaml.Media.PathSegment[]
      Windows.UI.Xaml.Media.PathSegment[]
      Windows.UI.Xaml.Media.PathSegment[]

      Provides the destination for the result. Size the initial array size as a "capacity" in order to specify how many results should be retrieved.

    Returns

    • uint
      uint
      uint

      The number of items retrieved.

  • GetView()
    GetView()
    GetView()
    GetView()

    Gets an immutable view into the collection.

    public IVectorView<PathSegment> GetView()public IVectorView<PathSegment> GetView()Public Function GetView() As IVectorView( Of PathSegment )

    Returns

    • An object representing the immutable collection view.

  • IndexOf(Windows.UI.Xaml.Media.PathSegment,System.UInt32)
    IndexOf(Windows.UI.Xaml.Media.PathSegment,System.UInt32)
    IndexOf(Windows.UI.Xaml.Media.PathSegment,System.UInt32)
    IndexOf(Windows.UI.Xaml.Media.PathSegment,System.UInt32)

    Retrieves the index of the specified item.

    public bool IndexOf(Windows.UI.Xaml.Media.PathSegment,System.UInt32)public bool IndexOf(Windows.UI.Xaml.Media.PathSegment,System.UInt32)Public Function IndexOf(Windows.UI.Xaml.Media.PathSegment,System.UInt32) As bool

    Parameters

    • value

      The value to find in the collection.

    • index
      System.UInt32
      System.UInt32
      System.UInt32

      The index of the item to find, if found.

    Returns

    • bool
      bool
      bool

      true if an item with the specified value was found; otherwise, false.

  • InsertAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)
    InsertAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)
    InsertAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)
    InsertAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)

    Inserts the specified item at the specified index.

    public void InsertAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)public void InsertAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)Public Function InsertAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment) As void

    Parameters

  • RemoveAt(System.UInt32)
    RemoveAt(System.UInt32)
    RemoveAt(System.UInt32)
    RemoveAt(System.UInt32)

    Removes the item at the specified index.

    public void RemoveAt(System.UInt32)public void RemoveAt(System.UInt32)Public Function RemoveAt(System.UInt32) As void

    Parameters

    • index
      System.UInt32
      System.UInt32
      System.UInt32

      The index position of the item to remove.

  • RemoveAtEnd()
    RemoveAtEnd()
    RemoveAtEnd()
    RemoveAtEnd()

    Removes the last item in the collection.

    public void RemoveAtEnd()public void RemoveAtEnd()Public Function RemoveAtEnd() As void
  • ReplaceAll(Windows.UI.Xaml.Media.PathSegment[])
    ReplaceAll(Windows.UI.Xaml.Media.PathSegment[])
    ReplaceAll(Windows.UI.Xaml.Media.PathSegment[])
    ReplaceAll(Windows.UI.Xaml.Media.PathSegment[])

    Initially clears the collection, then inserts the provided array as new items.

    public void ReplaceAll(Windows.UI.Xaml.Media.PathSegment[])public void ReplaceAll(Windows.UI.Xaml.Media.PathSegment[])Public Function ReplaceAll(Windows.UI.Xaml.Media.PathSegment[]) As void

    Parameters

    • items
      Windows.UI.Xaml.Media.PathSegment[]
      Windows.UI.Xaml.Media.PathSegment[]
      Windows.UI.Xaml.Media.PathSegment[]

      The new collection items.

  • SetAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)
    SetAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)
    SetAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)
    SetAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)

    Sets the value at the specified index to the PathSegment value specified.

    public void SetAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)public void SetAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment)Public Function SetAt(System.UInt32,Windows.UI.Xaml.Media.PathSegment) As void

    Parameters

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ActivatableAttribute

Details

Assembly

Windows.UI.Xaml.Media.dll