Class MBBladeSet
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
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
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
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
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
PageContent
Render fragment for the page content.
[Parameter]
public RenderFragment PageContent { get; set; }
Property Value
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
stringA string reference that the MBBladeSet component passes back via Context so the consumer can display the correct blade contents.
parameters
TParametersOptional parameters of type (or descending from) MBBladeComponentParameters
additionalCss
stringCSS styles to be applied to the <mb-blade> block.
additionalStyles
stringStyle 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
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
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
RemoveBladeAsync(string)
Animates the specified blade's closing sequence then removes it.
public Task RemoveBladeAsync(string bladeReference)
Parameters
bladeReference
stringThe reference of the blade to be removed.
Returns
Events
BladeSetChanged
Invoked without arguments at the outset of a blade being added or removed from the bladeset.
public event Action BladeSetChanged