HomeWindowsThe name ‘MessageBox’ does not exist in the current context for Universal App

The name ‘MessageBox’ does not exist in the current context for Universal App

In the earlier versions of Windows Phone , we could use the MessageBox.Show method to display message box within the Windows Phone app .

When tried to use the same within the Universal App , you might get an error.

The name ‘MessageBox’ does not exist in the current context

This is because , the Universal App / Windows Phone 8.1 XAML App has the new API defines in the Windows.UI.Popups name space which provides the MessageDialog class to display the messagebox with in the Universal App.

How to display MessageBox in Universal Apps ?

var dialog1 = new MessageDialog("Test Message from Ginktage");
await dialog1.ShowAsync();

Leave a Reply

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...