Universal Windows App Show Page As Dialog

user3863376 picture user3863376 · Nov 3, 2015 · Viewed 10.9k times · Source

I am trying to display a page as a dialog in Universal Window App (Windows 10).

In WFP, there is this ShowDialog to call on Window:

var msgBox = new MessageWindow();
msgBox.Owner = App.Current.MainWindow;
msgBox.WindowStartupLocation = WindowStartupLocation.CenterOwner;
msgBox.SetMessage(message, messageCategory);
msgBox.ShowDialog();

How do I do something like that in Universal Window App (Windows 10)?

Here is a Sample Picture of how it looks

Answer

Alan Yao - MSFT picture Alan Yao - MSFT · Nov 3, 2015

There is no exact same MessageWindow in UWP. It depends on what you want to do with the dialog.

In UWP, there are many options we can choose to display a popup/dialog to show information or require user interaction.

Dialog:

Lightweight Control:

If above cannot meet your requirement, try Popup which gives you more flexibility.