Share via


IInteractionService.PromptMessageBoxAsync Method

Definition

Prompts the user with a message box dialog.

public System.Threading.Tasks.Task<Aspire.Hosting.InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, Aspire.Hosting.MessageBoxInteractionOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PromptMessageBoxAsync : string * string * Aspire.Hosting.MessageBoxInteractionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.InteractionResult<bool>>
Public Function PromptMessageBoxAsync (title As String, message As String, Optional options As MessageBoxInteractionOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of InteractionResult(Of Boolean))

Parameters

title
String

The title of the message box.

message
String

The message to display in the message box.

options
MessageBoxInteractionOptions

Optional configuration for the message box interaction.

cancellationToken
CancellationToken

A token to cancel the operation.

Returns

An InteractionResult<T> containing true if the user accepted, false otherwise.

Applies to