Share via method

Displays the dialog.

Syntax /* Your success and error handlers */ );


This method has no parameters.

Return value

Type: Promise**

When the dialog is successfully shown, it returns a Promise that is fulfilled when the dialog is dismissed. The completion value is the DismissalResult value that was passed to the hide method.

If there was an error displaying the dialog, this method returns a Promise with one of these two values:

  • WinJS.UI.ContentDialog.ControlDisposed: Indicates that the dialog was already disposed.
  • WinJS.UI.ContentDialog.DialogAlreadyShowing: Indicates that the dialog is already being shown.

If the dialog is cancelled before it is shown, the Promise is cancelled as well.


Minimum WinJS version

WinJS 4.0



See also