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

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...