How to disable pointer release event ?

Shay Wilner 1,746 Reputation points
2020-07-20T16:06:23.81+00:00

Hi

How to disable pointer release event of relative panel control ?

I have a relative panel used as board game area ,sometime during the game i need to freeze the "game area" or disable pointer release event.

Thanks

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Richard Zhang-MSFT 6,936 Reputation points
    2020-07-21T01:36:54.04+00:00

    Hello,

    Welcome to Microsoft Q&A.

    As a derived class of Panel, RelativePanel cannot disable Pointer related events. But you can stop it from bubbling in the PointerReleased event callback.

    private void RelativePanel_PointerReleased(object sender, PointerRoutedEventArgs e)
    {
        e.Handled = true;
        //TODO
    }
    

    Thanks.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.