MessageDialog - needs to wait for user input
问题 I have a ViewModel which instantiates an event in a synchronous method. The event signals to the UI that we need a "Yes" or "No" answer from the user before continuing. I am trying to display a MessageDialog and wait until the user provides an answer - Yes or No. I am having a difficult time doing this. I currently get an UnauthorizedAccessException when trying to do this. Here's a look at the code in the UI: async Task<bool> Instance_SwitchConfirmation(string question) { MessageDialog md =