Editar

Partilhar via


TaskDialog.ShowDialogAsync Method

Definition

Overloads

ShowDialogAsync(TaskDialogPage, TaskDialogStartupLocation)

Shows the task dialog with the specified owner asynchronously.

ShowDialogAsync(IntPtr, TaskDialogPage, TaskDialogStartupLocation)

Shows the task dialog with the specified owner asynchronously.

ShowDialogAsync(IWin32Window, TaskDialogPage, TaskDialogStartupLocation)

Shows the task dialog with the specified owner asynchronously.

ShowDialogAsync(TaskDialogPage, TaskDialogStartupLocation)

Source:
TaskDialog.cs

Shows the task dialog with the specified owner asynchronously.

[System.Diagnostics.CodeAnalysis.Experimental("WFO5002", UrlFormat="https://aka.ms/winforms-warnings/{0}")]
public static System.Threading.Tasks.Task<System.Windows.Forms.TaskDialogButton> ShowDialogAsync (System.Windows.Forms.TaskDialogPage page, System.Windows.Forms.TaskDialogStartupLocation startupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterScreen);
[<System.Diagnostics.CodeAnalysis.Experimental("WFO5002", UrlFormat="https://aka.ms/winforms-warnings/{0}")>]
static member ShowDialogAsync : System.Windows.Forms.TaskDialogPage * System.Windows.Forms.TaskDialogStartupLocation -> System.Threading.Tasks.Task<System.Windows.Forms.TaskDialogButton>
Public Shared Function ShowDialogAsync (page As TaskDialogPage, Optional startupLocation As TaskDialogStartupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterScreen) As Task(Of TaskDialogButton)

Parameters

page
TaskDialogPage

The page instance that contains the contents which this task dialog will display.

startupLocation
TaskDialogStartupLocation

Gets or sets the position of the task dialog when it is shown.

Returns

The TaskDialogButton which was clicked by the user to close the dialog.

Attributes

Exceptions

page is null.

The specified page contains an invalid configuration.

Remarks

Showing the dialog will bind the page and its controls until this method returns or the dialog is navigated to a different page.

Applies to

ShowDialogAsync(IntPtr, TaskDialogPage, TaskDialogStartupLocation)

Source:
TaskDialog.cs

Shows the task dialog with the specified owner asynchronously.

[System.Diagnostics.CodeAnalysis.Experimental("WFO5002", UrlFormat="https://aka.ms/winforms-warnings/{0}")]
public static System.Threading.Tasks.Task<System.Windows.Forms.TaskDialogButton> ShowDialogAsync (IntPtr hwndOwner, System.Windows.Forms.TaskDialogPage page, System.Windows.Forms.TaskDialogStartupLocation startupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner);
[<System.Diagnostics.CodeAnalysis.Experimental("WFO5002", UrlFormat="https://aka.ms/winforms-warnings/{0}")>]
static member ShowDialogAsync : nativeint * System.Windows.Forms.TaskDialogPage * System.Windows.Forms.TaskDialogStartupLocation -> System.Threading.Tasks.Task<System.Windows.Forms.TaskDialogButton>
Public Shared Function ShowDialogAsync (hwndOwner As IntPtr, page As TaskDialogPage, Optional startupLocation As TaskDialogStartupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner) As Task(Of TaskDialogButton)

Parameters

hwndOwner
IntPtr

nativeint

The handle of the owner window, or Zero to show a modeless dialog.

page
TaskDialogPage

The page instance that contains the contents which this task dialog will display.

startupLocation
TaskDialogStartupLocation

The position of the task dialog when it is shown.

Returns

The TaskDialogButton which was clicked by the user to close the dialog.

Attributes

Exceptions

page is null.

The specified page contains an invalid configuration.

Remarks

Showing the dialog will bind the page and its controls until this method returns or the dialog is navigated to a different page.

Applies to

ShowDialogAsync(IWin32Window, TaskDialogPage, TaskDialogStartupLocation)

Source:
TaskDialog.cs

Shows the task dialog with the specified owner asynchronously.

[System.Diagnostics.CodeAnalysis.Experimental("WFO5002", UrlFormat="https://aka.ms/winforms-warnings/{0}")]
public static System.Threading.Tasks.Task<System.Windows.Forms.TaskDialogButton> ShowDialogAsync (System.Windows.Forms.IWin32Window owner, System.Windows.Forms.TaskDialogPage page, System.Windows.Forms.TaskDialogStartupLocation startupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner);
[<System.Diagnostics.CodeAnalysis.Experimental("WFO5002", UrlFormat="https://aka.ms/winforms-warnings/{0}")>]
static member ShowDialogAsync : System.Windows.Forms.IWin32Window * System.Windows.Forms.TaskDialogPage * System.Windows.Forms.TaskDialogStartupLocation -> System.Threading.Tasks.Task<System.Windows.Forms.TaskDialogButton>
Public Shared Function ShowDialogAsync (owner As IWin32Window, page As TaskDialogPage, Optional startupLocation As TaskDialogStartupLocation = System.Windows.Forms.TaskDialogStartupLocation.CenterOwner) As Task(Of TaskDialogButton)

Parameters

owner
IWin32Window

The owner window.

page
TaskDialogPage

The page instance that contains the contents which this task dialog will display.

startupLocation
TaskDialogStartupLocation

The position of the task dialog when it is shown.

Returns

The TaskDialogButton which was clicked by the user to close the dialog.

Attributes

Exceptions

page is null.

The specified page contains an invalid configuration.

Remarks

Showing the dialog will bind the page and its controls until this method returns or the dialog is navigated to a different page.

Applies to