我想在 UWP 中绘制一个带有触摸的矩形

I want to draw a rectangle with a touch in UWP

触摸起始坐标为矩形的起始坐标。 触摸结束坐标为矩形的结束坐标。

在WPF或Silverlight中,获取鼠标事件很简单。 UWP很难,因为它不知道触摸开始坐标和移动坐标以及结束坐标。

我该怎么办?

在 UWP 中,我们不使用单独的 mouse/touch 事件。我们使用指针,每个指针都有一个类型定义 (pen/touch/mouse)。查看 PointerPressedPointerReleased 事件。 You can get started here.