ContentDialog.show method

Displays the dialog.

Syntax

contentDialog.show().done( /* Your success and error handlers */ );

Parameters

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.

Requirements

Minimum WinJS version

WinJS 4.0

Namespace

WinJS.UI

See also

ContentDialog