I'm no expert on coding4fun controls but after testing it seems a fault on their part and not yours.
You have some solution here:
- Use another control from another library or built by you.
- Change the way your app show the user the message.
Use a workaround for example this seems to work:
protected override async void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) { e.Cancel = true; base.OnBackKeyPress(e); await Task.Yield(); MessagePrompt abortConfirm = new MessagePrompt(); abortConfirm.Title = "Are you sure you want to go to Main Menu?"; abortConfirm.Message = "All progress in the current game will be lost"; Button confirmAbort = new Button(); confirmAbort.Content = "Yes"; confirmAbort.Click += (object sender3, RoutedEventArgs e3) => { NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute)); }; Button cancelAbort = new Button(); cancelAbort.Content = "No"; cancelAbort.Click += (object sender2, RoutedEventArgs e2) => { //abortConfirm.Hide(); }; abortConfirm.ActionPopUpButtons.Clear(); abortConfirm.ActionPopUpButtons.Add(confirmAbort); abortConfirm.ActionPopUpButtons.Add(cancelAbort); abortConfirm.Show(); }
but note that I'm not sure that just yeilding the task will always give you the wanted result.
Or you might use a await await Task.Delay(1);
but again it's really a bad practice to use a delay for this kind of thing.