It is a well known fact, that Windows 8 UI is flat, chromeless and clean. Every single pixel on the screen is there to represent your information. App will be taken up the entire screen. Showing alert windows to users is more trivial for an App developer. But I am sure it is not possible to show something like below in new Windows 8 UI.

Windows 8 has an alternate way to show alert. The article shows how to show an alert dialog in Windows 8 XAML app.

Include the following namespace in your XAML project.

using Windows.UI.Popups;

Unlike WPF or Windows Forms, Windows 8 has no static Message box class. Instead above namespace contains a non-singleton class called MessageDialog.

protected override void OnNavigatedTo(NavigationEventArgs e)
{
  var dialog = new MessageDialog(“Hello !!! I am new to Windows 8 XAML”);
  dialog.ShowAsync();
}


Unlike WPF or Windows Forms, ShowAsync() method is not awaited by default. So the execution of current method continues before the call is completed. To avoid this Windows 8 introduced a new keyword await.

More information about await keyword is available here.

The below code will do the magic. To add await keyword, the entire method should be async.
protected async override void OnNavigatedTo(NavigationEventArgs e)
{
     var dialog = new MessageDialog(“Hello !!! I am new to Windows 8 XAML”);
     await dialog.ShowAsync();//Execution waits here until dialog processed.
     System.Diagnostics.Debug.WriteLine(“Go ahead!!”);
}


Commands can be added, which renders button for each command in dialog.

protected async override void OnNavigatedTo(NavigationEventArgs e)
{
     var dialog = new MessageDialog(“Hello !!! I am new to Windows 8 XAML”);
     dialog.Commands.Add(new UICommand(“Done”, new UICommandInvokedHandler(delegate(IUICommand command)
     {
           //Action goes here….

     })));
     dialog.Commands.Add(new UICommand(“Retry”, new UICommandInvokedHandler(delegate(IUICommand command)
     {
           //Action goes here….

     })));
     await dialog.ShowAsync();       
}