ContentDialog.ShowAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.Overload("ShowAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<ContentDialogResult> ShowAsync();
[Windows.Foundation.Metadata.Overload("ShowAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
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
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 equivalent 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.