I want to be able to detect if I have a pen close to the screen or not.
I would like for example to show a different appbar if I open it with a pen.
Also I would like to show other things on the screen when I hold a pen close to it (not necessarily touching it).

/Jimmy

有帮助吗?

解决方案

When a pen or finger is near the screen, you will get a PointerEntered event. The PointerPressed event fires when the pen or finger makes contact. If the hardware does not support proximity, then the PointerEntered does not fire until contact is made, and it will be followed immediately by a PointerPressed.

其他提示

I figured it out.
I listen to the PointerEntered-event and PointerExited-event and then sets a variable that I can check in the appbar_opened-event.
Works great.

/Jimmy

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top