PathSegmentCollection Classe

Definição

Representa uma coleção de objetos PathSegment que podem ser acessados individualmente pelo índice.

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>
Herança
Object Platform::Object IInspectable PathSegmentCollection
Atributos
Implementações

Requisitos do Windows

Família de dispositivos
Windows 10 (introduzida na 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduzida na v1.0)

Comentários

Essa classe é relevante para definir os dados de vetor para um Caminho ou um PathIcon.

Em vez de criar uma instância ou um elemento de objeto, você também pode definir diferentes tipos de segmentos como parte de um vetor dentro da cadeia de caracteres para uma sintaxe de comandos Mover e desenhar.

Enumerando a coleção em C# ou Microsoft Visual Basic

Um PathSegmentCollection é enumerável, portanto, você pode usar a sintaxe específica da linguagem, como foreach em C# para enumerar os itens na coleção. O compilador faz a conversão de tipo para você e você não precisará converter IEnumerable<PathSegment> explicitamente. Se você precisar converter explicitamente, por exemplo, se quiser chamar GetEnumerator, converta para IEnumerable com uma restrição PathSegment .

Construtores

PathSegmentCollection()

Inicializa uma nova instância da classe PathSegmentCollection .

Propriedades

Size

Obtém o tamanho (contagem) da coleção.

Métodos

Append(PathSegment)

Adiciona um novo item à coleção.

Clear()

Remove todos os itens da coleção.

First()

Retorna um iterador para os itens da coleção.

GetAt(UInt32)

Retorna o item localizado no índice especificado.

GetMany(UInt32, PathSegment[])

Recupera vários elementos em uma única passagem pelo iterador.

GetView()

Obtém uma exibição imutável na coleção.

IndexOf(PathSegment, UInt32)

Recupera o índice do item especificado.

InsertAt(UInt32, PathSegment)

Insere o item especificado no índice especificado.

RemoveAt(UInt32)

Remove o item no índice especificado.

RemoveAtEnd()

Remove o último item da coleção.

ReplaceAll(PathSegment[])

Inicialmente limpa a coleção e insere a matriz fornecida como novos itens.

SetAt(UInt32, PathSegment)

Define o valor no índice especificado como o valor PathSegment especificado.

Aplica-se a

Confira também