문제

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