Table of Contents

Class MBMenu

Namespace
Material.Blazor
Assembly
Material.Blazor.dll

This is a general purpose Material Theme menu.

public class MBMenu : ComponentFoundation, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance
MBMenu
Implements
Inherited Members

Constructors

MBMenu()

public MBMenu()

Properties

ChildContent

A render fragement as a set of MBListItems.

[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

MenuSurfacePositioning

Regular, fullwidth or fixed positioning/width.

[Parameter]
public MBMenuSurfacePositioning MenuSurfacePositioning { get; set; }

Property Value

MBMenuSurfacePositioning

OnMenuClosed

Called when the menu is closed.

[Parameter]
public Action OnMenuClosed { get; set; }

Property Value

Action

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool

NotifyClosed()

For Material Theme to notify of menu closure via JS Interop.

[JSInvokable]
public void NotifyClosed()

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

Task

A Task representing any asynchronous operation.

ToggleAsync()

Toggles the menu open and closed. NEED TO RETURN

Task
RATHER THAN
Task<string>
IN VERSION 2.0.0
public Task ToggleAsync()

Returns

Task