Pregunta

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

¿Fue útil?

Solución

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.

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top