locked
PointerPoint Button Press Event and Replacing PointerPoint Cursor

    Question

  • Hi Everyone,

    Does anyone know how or have example code to detect when the user presses the button on the side of stylus barrel or presses the "eraser" button on the stylus?

    Also, does anyone know how to change the tiny crosshair cursor that is drawn when the stylus is pressed or has entered into the view window? I would like to make it specific to my app.

    In my C++ Metro app I have set up event handlers to handle things like CoreWindow::PointerPressed and CoreWindow::PointerEntered events and I would like to register an event handler for when the user presses the button that is on the barrel of the stylus. In fact it would be nice to know if I can detect the "eraser" button on the back of the stylus as well.

    I cannot find any examples or documentation that suggests how to do this.

    Thanks!

    Wednesday, May 23, 2012 6:21 PM

Answers

  • There isn't a separate event for the different buttons. You can check if they are down in the PointerPoint.Properties.Is<whicheverbutton>ButtonPressed and IsEraser properties.

    To change the cursor set the CoreWindow.PointerCursor property.

    If you have multiple questions please post them in separate threads.

    --Rob

     

     

    • Marked as answer by TheMCP Wednesday, May 23, 2012 10:48 PM
    Wednesday, May 23, 2012 7:07 PM
    Owner

All replies

  • There isn't a separate event for the different buttons. You can check if they are down in the PointerPoint.Properties.Is<whicheverbutton>ButtonPressed and IsEraser properties.

    To change the cursor set the CoreWindow.PointerCursor property.

    If you have multiple questions please post them in separate threads.

    --Rob

     

     

    • Marked as answer by TheMCP Wednesday, May 23, 2012 10:48 PM
    Wednesday, May 23, 2012 7:07 PM
    Owner
  • Thanks, Rob!


    Wednesday, May 23, 2012 10:48 PM