Table of Contents

Class MudDrawer

Namespace
MudBlazor
Assembly
MudBlazor.dll

Represents a navigation panel docked to the side of the page.

public class MudDrawer : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, INavigationEventReceiver, IBrowserViewportObserver, IDisposable
Inheritance
MudDrawer
Implements
Inherited Members
Extension Methods

Constructors

MudDrawer()

Creates a new instance.

public MudDrawer()
See Also

Properties

Anchor

The edge of the container that the drawer will appear.

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

Property Value

Anchor

Remarks

Defaults to Start.

See Also

Breakpoint

The browser width at which responsive drawers are hidden.

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

Property Value

Breakpoint

Remarks

Defaults to Md. Supported breakpoints are:

Other breakpoint combinations are aliased as follows: Setting the value to None will always close the drawer, while Always will always keep it open.
See Also

BrowserViewportService

[Inject]
protected IBrowserViewportService BrowserViewportService { get; set; }

Property Value

IBrowserViewportService
See Also

ChildContent

The content within this drawer.

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

Property Value

RenderFragment
See Also

Classname

protected string Classname { get; }

Property Value

string
See Also

ClipMode

The position of this drawer when opened, relative to a MudAppBar when inside a MudLayout.

[Parameter]
[Category("Behavior")]
public DrawerClipMode ClipMode { get; set; }

Property Value

DrawerClipMode
See Also

Color

The color of the drawer.

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

Property Value

Color

Remarks

Defaults to Default.

See Also

Elevation

The size of the drop shadow.

[Parameter]
[Category("Appearance")]
public int Elevation { get; set; }

Property Value

int

Remarks

Defaults to 1. A higher number creates a heavier drop shadow. Use a value of 0 for no shadow.

See Also

Fixed

Shows the drawer in the same position even if the page is scrolled.

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

Property Value

bool

Remarks

Defaults to true.

See Also

Height

The height of this drawer.

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

Property Value

string

Remarks

Defaults to null. Values such as 300px and 30% are supported. Applies to drawers achored to the top or bottom.

See Also

MiniWidth

For mini drawers, the width of this drawer.

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

Property Value

string

Remarks

Defaults to null. Values such as 300px and 30% are supported. Applies to Mini drawers achored to the left or right.

See Also

Open

Displays this drawer.

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

Property Value

bool

Remarks

Defaults to false. Raises the OpenChanged event upon change. When bound via @bind-Open, this property is updated when this drawer closes itself.

See Also

OpenChanged

Occurs when the Open value has changed.

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

Property Value

EventCallback<bool>
See Also

OpenMiniOnHover

For mini drawers, opens this drawer when the pointer hovers over it.

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

Property Value

bool

Remarks

Defaults to false. Applies when Variant is set to Mini.

See Also

Overlay

For responsive and temporary drawers, darkens the screen with an overlay when displaying this drawer.

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

Property Value

bool

Remarks

Defaults to true. Applies when Variant is Responsive or Temporary.

See Also

OverlayClass

protected string OverlayClass { get; }

Property Value

string
See Also

Stylename

protected string Stylename { get; }

Property Value

string
See Also

Variant

The display variant of this drawer.

[Parameter]
[Category("Behavior")]
public DrawerVariant Variant { get; set; }

Property Value

DrawerVariant

Remarks

Defaults to Responsive.

See Also

Width

For non-fixed or temporary drawers, the width of this drawer.

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

Property Value

string

Remarks

Defaults to null. Values such as 300px and 30% are supported. Applies to non-fixed or Temporary drawers anchored to the left or right.

See Also

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder
See Also

Dispose()

public void Dispose()
See Also

Dispose(bool)

public virtual void Dispose(bool disposing)

Parameters

disposing bool
See Also

OnAfterRenderAsync(bool)

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task
See Also

OnInitialized()

protected override void OnInitialized()
See Also

See Also