Share via


PathFigureCollection 類別

定義

代表 PathFigure 物件的集合,這些物件共同組成 PathGeometry 的幾何。

public ref class PathFigureCollection sealed : IIterable<PathFigure ^>, IVector<PathFigure ^>
/// [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 PathFigureCollection final : IIterable<PathFigure>, IVector<PathFigure>
/// [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 PathFigureCollection final : IIterable<PathFigure>, IVector<PathFigure>
[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 PathFigureCollection : IEnumerable<PathFigure>, IList<PathFigure>
[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 PathFigureCollection : IEnumerable<PathFigure>, IList<PathFigure>
Public NotInheritable Class PathFigureCollection
Implements IEnumerable(Of PathFigure), IList(Of PathFigure)
<object>
  <object.property>
    oneOrMorePathFigures
  </object.property>
</object>
- or -
<object property="drawingCommands" ...>
繼承
Object Platform::Object IInspectable PathFigureCollection
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

列舉 C# 或 Microsoft Visual Basic 中的集合

PathFigureCollection 是可列舉的,因此您可以使用 C# 中的 foreach 之類的語言特定語法來列舉集合中的專案。 編譯程式會為您執行類型轉換,而且您不需要明確地轉換 。IEnumerable<PathFigure> 如果您需要明確轉換,例如,如果您想要呼叫 GetEnumerator,請使用 PathFigure 條件約束轉換成 IEnumerable<T>

建構函式

PathFigureCollection()

初始化 PathFigureCollection 類別的新實例。

屬性

Size

取得集合) 的大小 (計數。

方法

Append(PathFigure)

將新項目加入至集合中。

Clear()

移除集合的所有項目。

First()

傳回集合中專案的反覆運算器。

GetAt(UInt32)

傳回位於指定索引處的專案。

GetMany(UInt32, PathFigure[])

擷取單一傳遞反覆運算器中的多個專案。

GetView()

取得集合中的不可變檢視。

IndexOf(PathFigure, UInt32)

擷取指定專案的索引。

InsertAt(UInt32, PathFigure)

在指定的索引處插入指定的專案。

RemoveAt(UInt32)

移除指定之索引處的項目。

RemoveAtEnd()

拿掉集合中的最後一個專案。

ReplaceAll(PathFigure[])

一開始會清除集合,然後將提供的數位插入為新專案。

SetAt(UInt32, PathFigure)

將位於指定索引處的值設定為指定的 PathFigure 值。

適用於

另請參閱