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();

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply


x

Interesting BlogPosts to read

Download - Pokemon Go for for Windows 10 (Third Party app)
Pokemon Go is one of the popular AR games for android and iOS devices and now , the game is made ava...
Open Wordpad from command line in Windows
You can use the command "Write" from command line in Windows to open the WordPad application.D:\>...
Fasttrack Taxi for Windows with MaxCab feature
Fasttrack Taxi is an app that lets the users to book taxis in India and is one of the user friendly ...