Table of Contents

Class MBBladeSet

Namespace
Material.Blazor
Assembly
Material.Blazor.dll

A blade display component. Adds blades to the right hand side of the viewport (or bock where this component is located), with blades displayed left to right in ascending order of when they were requested (newest blades to the right).

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

Constructors

MBBladeSet()

public MBBladeSet()

Properties

BladeReferences

References to each blade presently shown. These references are passed back to render fragments via Context to tell the consumer what contents to render.

public ImmutableList<string> BladeReferences { get; }

Property Value

ImmutableList<string>

BladesAdditionalCss

Additional CSS classes to apply to the mb-blades block that contains all blades. Note that this block is not rendered if no blades are currently being displayed, so it's safe to use (for instance) a class such as

mdc-elevation--z3
that bleeds outside its block.
[Parameter]
public string BladesAdditionalCss { get; set; }

Property Value

string

BladesAdditionalStyles

Additional style attributes to apply to the mb-blades block that contains all blades. Note that this block is not rendered if no blades are currently being displayed, so it's safe to apply styles that bleed outside its block.

[Parameter]
public string BladesAdditionalStyles { get; set; }

Property Value

string

MainContentAdditionalCss

Additional CSS classes to apply to the mb-bladeset-main-content block that contains page content.

[Parameter]
public string MainContentAdditionalCss { get; set; }

Property Value

string

MainContentAdditionalStyles

Additional style attributes to apply to the mb-bladeset-main-content block that contains page content.

[Parameter]
public string MainContentAdditionalStyles { get; set; }

Property Value

string

PageContent

Render fragment for the page content.

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

Property Value

RenderFragment

Methods

AddBladeAsync<TComponent, TParameters>(string, TParameters, string, string, Action<string>)

Adds the specified blade then animating its opening sequence.

public Task AddBladeAsync<TComponent, TParameters>(string bladeReference, TParameters parameters = null, string additionalCss = "", string additionalStyles = "", Action<string> onRemoved = null) where TParameters : MBBladeComponentParameters

Parameters

bladeReference string

A string reference that the MBBladeSet component passes back via Context so the consumer can display the correct blade contents.

parameters TParameters

Optional parameters of type (or descending from) MBBladeComponentParameters

additionalCss string

CSS styles to be applied to the <mb-blade> block.

additionalStyles string

Style attributes to be applied to the <mb-blade> block.

onRemoved Action<string>

Action called back when the blade is removed, receiving the blade reference as the parameter

Returns

Task

Type Parameters

TComponent
TParameters

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

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

OnParametersSetAsync()

When overriding this, call await base.OnParametersSetAsync(); before any user code unless there is a very good reason not to.

protected override Task OnParametersSetAsync()

Returns

Task

RemoveBladeAsync(string)

Animates the specified blade's closing sequence then removes it.

public Task RemoveBladeAsync(string bladeReference)

Parameters

bladeReference string

The reference of the blade to be removed.

Returns

Task

Events

BladeSetChanged

Invoked without arguments at the outset of a blade being added or removed from the bladeset.

public event Action BladeSetChanged

Event Type

Action