Table of Contents

Class MudMessageBox

Namespace
MudBlazor
Assembly
MudBlazor.dll
public class MudMessageBox : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudMessageBox
Implements
Inherited Members
Extension Methods

Constructors

MudMessageBox()

public MudMessageBox()

Properties

CancelButton

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

[Parameter]
[Category("Behavior")]
public RenderFragment? CancelButton { get; set; }

Property Value

RenderFragment

CancelText

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

[Parameter]
[Category("Behavior")]
public string? CancelText { get; set; }

Property Value

string

Classname

protected string Classname { get; }

Property Value

string

MarkupMessage

The message box message as markup string.

[Parameter]
[Category("Behavior")]
public MarkupString MarkupMessage { get; set; }

Property Value

MarkupString

Message

The message box message as string.

[Parameter]
[Category("Behavior")]
public string? Message { get; set; }

Property Value

string

MessageContent

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

[Parameter]
[Category("Behavior")]
public RenderFragment? MessageContent { get; set; }

Property Value

RenderFragment

NoButton

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

[Parameter]
[Category("Behavior")]
public RenderFragment? NoButton { get; set; }

Property Value

RenderFragment

NoText

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

[Parameter]
[Category("Behavior")]
public string? NoText { get; set; }

Property Value

string

OnCancel

Fired when the cancel button is clicked or the msg box was closed via the X

[Parameter]
public EventCallback<bool> OnCancel { get; set; }

Property Value

EventCallback<bool>

OnNo

Fired when the no button is clicked

[Parameter]
public EventCallback<bool> OnNo { get; set; }

Property Value

EventCallback<bool>

OnYes

Fired when the yes button is clicked

[Parameter]
public EventCallback<bool> OnYes { get; set; }

Property Value

EventCallback<bool>

Title

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

[Parameter]
[Category("Behavior")]
public string? Title { get; set; }

Property Value

string

TitleContent

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

[Parameter]
[Category("Behavior")]
public RenderFragment? TitleContent { get; set; }

Property Value

RenderFragment

Visible

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

[Parameter]
[Category("Behavior")]
public bool Visible { get; set; }

Property Value

bool

VisibleChanged

Raised when the inline dialog's display status changes.

[Parameter]
public EventCallback<bool> VisibleChanged { get; set; }

Property Value

EventCallback<bool>

YesButton

Define the yes button as a render fragment (overrides YesText). Must be a MudButton

[Parameter]
[Category("Behavior")]
public RenderFragment? YesButton { get; set; }

Property Value

RenderFragment

YesText

Text of the yes/OK button. Leave null to hide the button.

[Parameter]
[Category("Behavior")]
public string YesText { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

Close()

public void Close()

OnInitialized()

protected override void OnInitialized()

ShowAsync(DialogOptions?)

public Task<bool?> ShowAsync(DialogOptions? options = null)

Parameters

options DialogOptions

Returns

Task<bool?>