Jaa


ContentDialog.ShowAsync Method

Definition

Overloads

ShowAsync()

Begins an asynchronous operation to show the dialog.

ShowAsync(ContentDialogPlacement)

Begins an asynchronous operation to show the dialog with the specified placement.

ShowAsync()

Begins an asynchronous operation to show the dialog.

public:
 virtual IAsyncOperation<ContentDialogResult> ^ ShowAsync() = ShowAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<ContentDialogResult> ShowAsync();
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Overload("ShowAsync")]
IAsyncOperation<ContentDialogResult> ShowAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<ContentDialogResult> ShowAsync();
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Overload("ShowAsync")]
public IAsyncOperation<ContentDialogResult> ShowAsync();
function showAsync()
Public Function ShowAsync () As IAsyncOperation(Of ContentDialogResult)

Returns

An asynchronous operation showing the dialog. When complete, returns a ContentDialogResult.

Attributes

Applies to

ShowAsync(ContentDialogPlacement)

Begins an asynchronous operation to show the dialog with the specified placement.

public:
 virtual IAsyncOperation<ContentDialogResult> ^ ShowAsync(ContentDialogPlacement placement) = ShowAsync;
/// [Windows.Foundation.Metadata.Overload("ShowAsyncWithPlacement")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<ContentDialogResult> ShowAsync(ContentDialogPlacement const& placement);
[Windows.Foundation.Metadata.Overload("ShowAsyncWithPlacement")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<ContentDialogResult> ShowAsync(ContentDialogPlacement placement);
function showAsync(placement)
Public Function ShowAsync (placement As ContentDialogPlacement) As IAsyncOperation(Of ContentDialogResult)

Parameters

placement
ContentDialogPlacement

A value that specifies whether the dialog is placed in the PopupRoot or in its parent's visual tree.

Returns

An asynchronous operation showing the dialog. When complete, returns a ContentDialogResult.

Attributes

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Remarks

When you call this method with the ContentDialogPlacement.Popup parameter value, the dialog is rooted in the PopupRoot element of the XAML Window. This is the default behavior, and is equivilent to calling the ShowAsync method with no parameters.

When you call this method with the ContentDialogPlacement.InPlace parameter value:

  • If the dialog has a parent element, the dialog is rooted in the parent's visual tree. It's shown inline along with the parent’s other child elements, and participates in the parent container’s layout.
  • If the dialog has no parent, the dialog falls back to the default behavior and is shown in the PopupRoot.

Applies to