Table of Contents

Class MBMenuSurface

Namespace
Material.Blazor
Assembly
Material.Blazor.dll

This is a general purpose Material Theme menu surface.

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

Constructors

MBMenuSurface()

public MBMenuSurface()

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

OnMenuOpened

Called when the menu is opened.

[Parameter]
public Action OnMenuOpened { 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()

NotifyOpened()

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

[JSInvokable]
public void NotifyOpened()

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.

public Task ToggleAsync()

Returns

Task