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
CancelText
Text of the cancel button. Leave null to hide the button.
[Parameter]
[Category("Behavior")]
public string? CancelText { get; set; }
Property Value
Classname
protected string Classname { get; }
Property Value
MarkupMessage
The message box message as markup string.
[Parameter]
[Category("Behavior")]
public MarkupString MarkupMessage { get; set; }
Property Value
Message
The message box message as string.
[Parameter]
[Category("Behavior")]
public string? Message { get; set; }
Property Value
MessageContent
Define the message box body as a renderfragment (overrides Message)
[Parameter]
[Category("Behavior")]
public RenderFragment? MessageContent { get; set; }
Property Value
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
NoText
Text of the no button. Leave null to hide the button.
[Parameter]
[Category("Behavior")]
public string? NoText { get; set; }
Property Value
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
OnNo
Fired when the no button is clicked
[Parameter]
public EventCallback<bool> OnNo { get; set; }
Property Value
OnYes
Fired when the yes button is clicked
[Parameter]
public EventCallback<bool> OnYes { get; set; }
Property Value
Title
The message box title. If null or empty, title will be hidden
[Parameter]
[Category("Behavior")]
public string? Title { get; set; }
Property Value
TitleContent
Define the message box title as a renderfragment (overrides Title)
[Parameter]
[Category("Behavior")]
public RenderFragment? TitleContent { get; set; }
Property Value
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
VisibleChanged
Raised when the inline dialog's display status changes.
[Parameter]
public EventCallback<bool> VisibleChanged { get; set; }
Property Value
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
YesText
Text of the yes/OK button. Leave null to hide the button.
[Parameter]
[Category("Behavior")]
public string YesText { get; set; }
Property Value
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