locked
Closing a MessageDialog when clicking outside of the dialog?

    Question

  • How can we capture the event of a user clicking outside the bounds of the MessageDialog control in order to tell the window to close?
    Wednesday, August 20, 2014 3:27 PM

Answers

  • Hi Jaxim,

    I don't think we can implement this feature because the the dialog dims the screen behind it and blocks touch events from passing to the app's canvas until the user responds. That means our click event on the screen will not fire any event and we could not close the MessageDialog.

    However you could try with a Flyout control which accept click outside close, see more information for Flyout: Quickstart: Adding a Flyout.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, August 21, 2014 5:57 AM
    Moderator