MessageBoxes in Windows Phone 8.1

If you want to use MessageBoxes with your Windows Phone 8.1 Applications instead of using MessageBox you’ll need to use MessageDialog.

Make sure to include the following using statement:

using Windows.UI.Popups;

The code to launch a message box is as follows:

MessageDialog msgDialog = new MessageDialog("Works in Windows Phone 8.1");
//launch the dialog
await dialog.ShowAsync();

Hope that helps.

Omar Elabd

Omar Elabd

Omar Elabd is a software developer specializing within the .NET Framework. He has experience in developing Web and Desktop based applications using ASP.NET, MVC, WebAPI and WPF.
Omar Elabd
  • Sean Patterson

    Thanks for this! I had been battling with this for a while. All the other instructions on line say to use MessageBox.Show(“”); and this does not work.