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
.
Is there a way to detect if a pen is in proximity to the screen in WinRT
-
12-12-2021 - |
Question
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
Solution
OTHER TIPS
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow