XAML PointerEntered and PointerExited button events RRS feed

  • Question

  • I am working on a C++/XAML app for a musical piano with several Windows::UI::XAML::Controls::Buttons next to each other.

    I want to be able to slide a finger across the row of buttons and have the corresponding piano key sounds play.

    I tried assigning PointerEntered and PointerExited events to the buttons.

    If the first PointerEntered event is from sliding a finger touch into the bounding box of a button, the remaining finger slides to the neighboring buttons continue to fire PointerEntered events.

    However, if the first PointerEntered event is from a finger press down into the bounding box of a button, sliding a finger to the neighboring buttons does not fire a PointerEntered event; only one piano key note is played.

    How can I work around this limitation to the PointerEntered events?

    Would I have to use the Windows::UI::Input::PointerPoint class, and then do the math to figure out if the pointer is within the bounding box of a button?

    Saturday, January 24, 2015 7:23 PM

All replies