MudBlazor

MudMessageBox API

Properties

Name Type Default Description
CancelButton
RenderFragment

null

Define the cancel button as a render fragment (overrides CancelText). Must be a MudButton
CancelText
String

null

Text of the cancel button. Leave null to hide the button.
IsVisible
Boolean

False

Bind this two-way to show and close an inlined message box. Has no effect on opened msg boxes
Message
String

null

The message box title. If null or empty, title will be hidden
MessageContent
RenderFragment

null

Define the message box body as a renderfragment (overrides Message)
NoButton
RenderFragment

null

Define the no button as a render fragment (overrides CancelText). Must be a MudButton
NoText
String

null

Text of the no button. Leave null to hide the button.
Title
String

null

The message box title. If null or empty, title will be hidden
TitleContent
RenderFragment

null

Define the message box title as a renderfragment (overrides Title)
YesButton
RenderFragment

null

Define the cancel button as a render fragment (overrides CancelText). Must be a MudButton
YesText
String

"OK"

Text of the yes/OK button. Leave null to hide the button.
Inherited from MudComponentBase
Class
String

null

User class names, separated by space.
Style
String

null

User styles, applied on top of the component's own classes and styles.
Tag
Object

null

Use Tag to attach any user data object to the component for your convenience.
UserAttributes
Dictionary<String, Object>

UserAttributes carries all attributes you add to the component that don't match any of its parameters. They will be splatted onto the underlying HTML tag.

EventCallbacks

Name Type Description
IsVisibleChanged
EventCallback<Boolean>
Raised when the inline dialog's display status changes.
OnCancel
EventCallback<Boolean>
Fired when the cancel button is clicked or the msg box was closed via the X
OnNo
EventCallback<Boolean>
Fired when the no button is clicked
OnYes
EventCallback<Boolean>
Fired when the yes button is clicked

Methods

Name Parameters Return Description
Close()
Task<Boolean?> Show(DialogOptions options)
DialogOptions options
Task<Nullable<Boolean>>
An error has occurred. This application may no longer respond until reloaded. Reload 🗙