Blazorise Message Service API

Review the provider component and service methods used to display messages, confirmations, and choices.

For setup instructions and examples, see the Message Service documentation.

API

Parameters

ParameterDefaultType
BackgroundCanceltruebool

By default, a modal is cancelled if the user clicks anywhere outside the modal. This behavior can be disabled by setting BackgroundCancel to false.
CallbacknullTaskCompletionSource<object>

Occurs after the user respond with an action button.
CloseOnEscapefalsebool

If true, the message dialog will be closed when the user presses the Escape key. Confirmation dialogs will treat Escape as a cancel action.
MessagenullMarkupString

Specifies the message content.
MessageTypeMessageType.InfoMessageType

Specifies the message type.
Possible values:InfoSuccessWarningErrorConfirmationChoice
OptionsnullMessageOptions

Specifies the custom message options.
Title—string

Specifies the message title.

Events

EventType
CanceledEventCallback

Occurs after the user has responded with a Cancel action.
ConfirmedEventCallback

Occurs after the user has responded with a Confirm action.
OkayedEventCallback

Occurs after the user has responded with an OK action.

IMessageService

Events

EventType
MessageReceivedEventHandler<MessageEventArgs>

Raised when a message request is received by the provider.

Methods

MethodReturnParameters
InfoTaskmessage, title = null, options = null

Shows an informational message. String and MarkupString overloads are available.
SuccessTaskmessage, title = null, options = null

Shows a success message. String and MarkupString overloads are available.
WarningTaskmessage, title = null, options = null

Shows a warning message. String and MarkupString overloads are available.
ErrorTaskmessage, title = null, options = null

Shows an error message. String and MarkupString overloads are available.
ConfirmTask<bool>message, title = null, options = null

Shows a confirmation dialog and returns the user's decision.
ChooseTask<object>message, title = null, options = null

Shows a choice dialog and returns the selected value.
On this page