TransformCollection 类

定义

表示可按索引单独访问的 Transform 对象的集合。

public ref class TransformCollection sealed : IIterable<Transform ^>, IVector<Transform ^>
/// [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 TransformCollection final : IIterable<Transform>, IVector<Transform>
/// [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 TransformCollection final : IIterable<Transform>, IVector<Transform>
[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 TransformCollection : IEnumerable<Transform>, IList<Transform>
[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 TransformCollection : IEnumerable<Transform>, IList<Transform>
Public NotInheritable Class TransformCollection
Implements IEnumerable(Of Transform), IList(Of Transform)
<object>
  <object.property>
    oneOrMoreTransforms
  </object.property>
</object>
继承
Object Platform::Object IInspectable TransformCollection
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

枚举 C# 或 Microsoft Visual Basic 中的集合

TransformCollection 是可枚举的,因此可以使用特定于语言的语法(如 C# 中的 foreach )枚举集合中的项。 编译器为你执行类型强制转换,你无需显式转换为 IEnumerable<Transform> 。 如果需要显式强制转换(例如,如果要调用 GetEnumerator),请使用转换约束强制转换为 IEnumerable<T>

构造函数

TransformCollection()

初始化 TransformCollection 类的新实例。

属性

Size

获取集合的大小 (计数) 。

方法

Append(Transform)

将新项添加到集合。

Clear()

从集合中移除所有项。

First()

返回集合中项的迭代器。

GetAt(UInt32)

返回位于指定索引处的项。

GetMany(UInt32, Transform[])

通过迭代器在一次传递中检索多个元素。

GetView()

获取集合中的不可变视图。

IndexOf(Transform, UInt32)

检索指定项的索引。

InsertAt(UInt32, Transform)

在指定的索引处插入指定的项。

RemoveAt(UInt32)

删除指定索引处的项。

RemoveAtEnd()

删除集合中的最后一项。

ReplaceAll(Transform[])

首先清除集合,然后将提供的数组作为新项插入。

SetAt(UInt32, Transform)

将指定索引处的值设置为指定的 转换 值。

适用于

另请参阅