Table of Contents

Class MudDialogProvider

Namespace
MudBlazor
Assembly
MudBlazor.dll

A manager for MudDialog instances.

public class MudDialogProvider : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance
MudDialogProvider
Implements
Inherited Members
Extension Methods

Remarks

Add this component to your layout page if your application needs to display dialogs.

Constructors

MudDialogProvider()

public MudDialogProvider()

Properties

BackdropClick

Allows dialogs to be closed by clicking outside of them by default.

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

Property Value

bool?

Remarks

Defaults to true.

BackgroundClass

The custom CSS classes to apply to dialogs by default.

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

Property Value

string

Remarks

Multiple classes must be separated by spaces.

CloseButton

Shows a close button in the top-right corner for all dialogs by default.

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

Property Value

bool?

Remarks

Defaults to null.

CloseOnEscapeKey

Allows dialogs to be closed by pressing the Escape key by default.

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

Property Value

bool?

FullWidth

Sets the width of dialogs to the width of the screen by default.

[Parameter]
[Category("Appearance")]
public bool? FullWidth { get; set; }

Property Value

bool?

Remarks

Defaults to null.

MaxWidth

The maximum allowed with of the dialog.

[Parameter]
[Category("Appearance")]
public MaxWidth? MaxWidth { get; set; }

Property Value

MaxWidth?

Remarks

Defaults to null.

NoHeader

Hides headers for all dialogs by default.

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

Property Value

bool?

Remarks

Defaults to null.

Position

The location of dialogs by default.

[Parameter]
[Category("Appearance")]
public DialogPosition? Position { get; set; }

Property Value

DialogPosition?

Remarks

Defaults to null.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

DismissAll()

Hides all currently visible dialogs.

public void DismissAll()

Dispose()

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

OnAfterRenderAsync(bool)

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

OnInitialized()

protected override void OnInitialized()

See Also