Table of Contents

Class MudDialogContainer

Namespace
MudBlazor
Assembly
MudBlazor.dll

An instance of a MudDialog.

public class MudDialogContainer : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IMudDialogInstance, IAsyncDisposable
Inheritance
MudDialogContainer
Implements
Inherited Members
Extension Methods

Remarks

When a MudDialog is shown, a new instance is created. This instance can then be used to perform actions such as hiding the dialog programmatically.

Constructors

MudDialogContainer()

public MudDialogContainer()

Properties

BackgroundClassname

protected string BackgroundClassname { get; }

Property Value

string

Classname

protected string Classname { get; }

Property Value

string

CloseIcon

The custom icon displayed in the upper-right corner for closing this dialog.

[Parameter]
[Category("Appearance")]
public string CloseIcon { get; set; }

Property Value

string

Remarks

Defaults to Close.

Content

The content within this dialog.

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

Property Value

RenderFragment

Remarks

Defaults to the content of the MudDialog being displayed.

Id

The unique ID for this instance.

[Parameter]
[Category("Behavior")]
public Guid Id { get; set; }

Property Value

Guid

Options

The options used for this dialog.

[Parameter]
[Category("Misc")]
public DialogOptions Options { get; set; }

Property Value

DialogOptions

Remarks

Defaults to the options in the MudDialog or options passed during ShowAsync(Type) methods.

RightToLeft

[CascadingParameter(Name = "RightToLeft")]
public bool RightToLeft { get; set; }

Property Value

bool

Title

The text displayed at the top of this dialog if TitleContent is not set.

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

Property Value

string

TitleClassname

protected string TitleClassname { get; }

Property Value

string

TitleContent

The custom content at the top of this dialog.

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

Property Value

RenderFragment

Remarks

This content will display so long as Title is not set.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

DisposeAsync()

public ValueTask DisposeAsync()

Returns

ValueTask

DisposeAsyncCore()

protected virtual ValueTask DisposeAsyncCore()

Returns

ValueTask

OnAfterRenderAsync(bool)

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

See Also