Class MBDrawer
This is a general purpose Material Theme drawer.
public class MBDrawer : ComponentFoundation, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
- Inheritance
-
MBDrawer
- Implements
- Inherited Members
Constructors
MBDrawer()
public MBDrawer()
Properties
ChildContent
The drawer contents.
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
CloseOnNavigate
Closes the drawer when NotifyNavigation() is called if True. Defaults to True.
[Parameter]
public bool CloseOnNavigate { get; set; }
Property Value
IsDismissible
The drawer can be dismissed if True. Defaults to True.
[Parameter]
public bool IsDismissible { get; set; }
Property Value
StartOpen
Determines whether the drawer should be open on startup. Defaults to False.
[Parameter]
public bool StartOpen { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
NotifyNavigation()
Called by the consumer to tell the drawer that navigation has taken place.
public void NotifyNavigation()
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
protected override Task OnInitializedAsync()
Returns
Toggle()
Toggles the drawer's state.
public void Toggle()
Toggle(bool)
Toggles the drawer's state to the requested value.
public void Toggle(bool open)
Parameters
open
bool