UIElement.PointerCaptures 属性

定义

获取所有捕获的指针的集合,表示为 Pointer 值。

public:
 property IVectorView<Pointer ^> ^ PointerCaptures { IVectorView<Pointer ^> ^ get(); };
IVectorView<Pointer> PointerCaptures();
public IReadOnlyList<Pointer> PointerCaptures { get; }
var iVectorView = uIElement.pointerCaptures;
Public ReadOnly Property PointerCaptures As IReadOnlyList(Of Pointer)

属性值

捕获的指针的集合,每个指针表示为 Pointer 对象。

注解

有关如何捕获指针以及为何要捕获指针的详细信息,请参阅 CapturePointer

由于存在涉及多个指针点的操作等输入方案,因此Windows 运行时允许一次捕获多个指针。 PointerCaptures 属性公开 UIElement 当前捕获的指针点的视图。

此属性的值是根据其他操作的结果计算的。 调用 CapturePointer 会将添加到 PointerCaptures 提供只读视图的内部集合。 调用 ReleasePointerCapture 会从集合中删除。 ReleasePointerCaptures 清除集合。 使指针捕获无效的用户操作(例如从指针点释放)也会更改捕获状态,从而更改集合。 有关详细信息,请参阅 鼠标交互处理指针输入

集合不一定由 PointerId 编制索引。 若要查找特定的 PointerId,必须检查集合中的项并引用特定的 Pointer

适用于