Table of Contents

Class MBPopover

Namespace
Material.Blazor
Assembly
Material.Blazor.dll

Similar to MBMenuSurface in functionality, but with lazy rendering and late instantiation of layout children as per MBDialog.

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

Constructors

MBPopover()

public MBPopover()

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

HideAsync()

Hides the dialog first by allowing Material Theme to close it gracefully, then removing the Blazor markup.

public Task HideAsync()

Returns

Task

NotifyClosed()

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

[JSInvokable]
public Task NotifyClosed()

Returns

Task

NotifyOpened()

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

[JSInvokable]
public void NotifyOpened()

OnAfterRenderAsync(bool)

Material.Blazor components generally should not override this because it handles the case where components need to be adjusted when inside an MBDialog or MBCard.

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

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.

ShowAsync()

Shows the popover. This first renders the Blazor markup and then allows Material Theme to open the popover, subsequently initiating all embedded Blazor components.

public Task ShowAsync()

Returns

Task

The action string resulting from dialog closure