PathSegmentCollection Classe

Définition

Représente une collection d’objets PathSegment accessibles individuellement par index.

public ref class PathSegmentCollection sealed : IIterable<PathSegment ^>, IVector<PathSegment ^>
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PathSegmentCollection final : IIterable<PathSegment>, IVector<PathSegment>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class PathSegmentCollection final : IIterable<PathSegment>, IVector<PathSegment>
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PathSegmentCollection : IEnumerable<PathSegment>, IList<PathSegment>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PathSegmentCollection : IEnumerable<PathSegment>, IList<PathSegment>
Public NotInheritable Class PathSegmentCollection
Implements IEnumerable(Of PathSegment), IList(Of PathSegment)
<object>
  <object.property>
    oneOrMorePathSegments
  </object.property>
</object>
Héritage
Object Platform::Object IInspectable PathSegmentCollection
Attributs
Implémente

Configuration requise pour Windows

Famille d’appareils
Windows 10 (introduit dans 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v1.0)

Remarques

Cette classe est pertinente pour définir les données vectorielles pour un Path ou un PathIcon.

Plutôt que de créer un instance ou un élément objet, vous pouvez également définir différents types de segments dans le cadre d’un vecteur dans la chaîne pour une syntaxe de commandes Déplacer et dessiner.

Énumération de la collection en C# ou Microsoft Visual Basic

Un PathSegmentCollection étant énumérable, vous pouvez utiliser une syntaxe spécifique au langage, telle que foreach en C# pour énumérer les éléments de la collection. Le compilateur effectue le casting de type pour vous et vous n’aurez pas besoin de caster IEnumerable<PathSegment> explicitement. Si vous devez effectuer un cast explicite, par exemple si vous souhaitez appeler GetEnumerator, effectuez un cast en IEnumerable avec une contrainte PathSegment .

Constructeurs

PathSegmentCollection()

Initialise une nouvelle instance de la classe PathSegmentCollection.

Propriétés

Size

Obtient la taille (nombre) de la collection.

Méthodes

Append(PathSegment)

Ajoute un nouvel élément à la collection.

Clear()

Supprime tous les éléments de la collection.

First()

Retourne un itérateur pour les éléments de la collection.

GetAt(UInt32)

Retourne l’élément situé à l’index spécifié.

GetMany(UInt32, PathSegment[])

Récupère plusieurs éléments en un seul passage par l’itérateur.

GetView()

Obtient une vue immuable dans la collection.

IndexOf(PathSegment, UInt32)

Récupère l’index de l’élément spécifié.

InsertAt(UInt32, PathSegment)

Insère l’élément spécifié à l’index spécifié.

RemoveAt(UInt32)

Supprime l'élément à l'index spécifié.

RemoveAtEnd()

Supprime le dernier élément de la collection.

ReplaceAll(PathSegment[])

Efface initialement la collection, puis insère le tableau fourni en tant que nouveaux éléments.

SetAt(UInt32, PathSegment)

Définit la valeur à l’index spécifié sur la valeur PathSegment spécifiée.

S’applique à

Voir aussi