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
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
Remarks
Defaults to Md. Supported breakpoints are:
Other breakpoint combinations are aliased as follows:- SmAndDown: Aliases to Sm
- MdAndDown: Aliases to Md
- LgAndDown: Aliases to Lg
- XlAndDown: Aliases to Xl
- SmAndUp: Aliases to Sm
- MdAndUp: Aliases to Md
- LgAndUp: Aliases to Lg
- XlAndUp: Aliases to Xl
- See Also
BrowserViewportService
[Inject]
protected IBrowserViewportService BrowserViewportService { get; set; }
Property Value
- See Also
ChildContent
The content within this drawer.
[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }
Property Value
- See Also
Classname
protected string Classname { get; }
Property Value
- See Also
ClipMode
[Parameter]
[Category("Behavior")]
public DrawerClipMode ClipMode { get; set; }
Property Value
- See Also
Color
The color of the drawer.
[Parameter]
[Category("Appearance")]
public Color Color { get; set; }
Property Value
Remarks
Defaults to Default.
- See Also
Elevation
The size of the drop shadow.
[Parameter]
[Category("Appearance")]
public int Elevation { get; set; }
Property Value
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
Remarks
Defaults to true
.
- See Also
Height
The height of this drawer.
[Parameter]
[Category("Appearance")]
public string? Height { get; set; }
Property Value
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
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
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
- 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
Remarks
- 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
Remarks
Defaults to true
. Applies when Variant is Responsive or Temporary.
- See Also
OverlayClass
protected string OverlayClass { get; }
Property Value
- See Also
Stylename
protected string Stylename { get; }
Property Value
- See Also
Variant
The display variant of this drawer.
[Parameter]
[Category("Behavior")]
public DrawerVariant Variant { get; set; }
Property Value
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
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
- See Also
OnInitialized()
protected override void OnInitialized()
- See Also