ContentDialog.ShowAsync Method
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.
ShowAsync() |
Begins an asynchronous operation to show the dialog. |
ShowAsync(ContentDialogPlacement) |
Begins an asynchronous operation to show the dialog with the specified placement. |
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
WinRT Build 26100 en andere versies
Product | Versies |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
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
WinRT Build 26100 en andere versies
Product | Versies |
---|---|
WinRT | Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |