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).
Implements
Inherited Members
Namespace: Material.Blazor
Assembly: Material.Blazor.dll
Syntax
public class MBBladeSet : ComponentFoundation, IDisposable
Properties
| Improve this Doc View SourceBladeReferences
References to each blade presently shown. These references are passed back to render fragments via Context to tell the consumer what contents to render.
Declaration
public ImmutableList<string> BladeReferences { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
public string BladesAdditionalCss { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
public string BladesAdditionalStyles { get; set; }
Property Value
Type | Description |
---|---|
String |
MainContentAdditionalCss
Additional CSS classes to apply to the mb-bladeset-main-content block that contains page content.
Declaration
public string MainContentAdditionalCss { get; set; }
Property Value
Type | Description |
---|---|
String |
MainContentAdditionalStyles
Additional style attributes to apply to the mb-bladeset-main-content block that contains page content.
Declaration
public string MainContentAdditionalStyles { get; set; }
Property Value
Type | Description |
---|---|
String |
PageContent
Render fragment for the page content.
Declaration
public RenderFragment PageContent { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment |
Methods
| Improve this Doc View SourceAddBladeAsync<TComponent, TParameters>(String, TParameters, String, String, Action<String>)
Adds the specified blade then animating its opening sequence.
Declaration
public Task AddBladeAsync<TComponent, TParameters>(string bladeReference, TParameters parameters = null, string additionalCss = "", string additionalStyles = "", Action<string> onRemoved = null)
where TParameters : MBBladeComponentParameters
Parameters
Type | Name | Description |
---|---|---|
String | bladeReference | A string reference that the MBBladeSet component passes back via Context so the consumer can display the correct blade contents. |
TParameters | parameters | Optional parameters of type (or descending from) MBBladeComponentParameters |
String | additionalCss | CSS styles to be applied to the <mb-blade> block. |
String | additionalStyles | Style attributes to be applied to the <mb-blade> block. |
Action<String> | onRemoved | Action called back when the blade is removed, receiving the blade reference as the parameter |
Returns
Type | Description |
---|---|
Task |
Type Parameters
Name | Description |
---|---|
TComponent | |
TParameters |
OnAfterRenderAsync(Boolean)
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
Boolean | firstRender |
Returns
Type | Description |
---|---|
Task |
Overrides
| Improve this Doc View SourceOnParametersSetAsync()
Declaration
protected override async Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
Task |
Overrides
| Improve this Doc View SourceRemoveBladeAsync(String)
Animates the specified blade's closing sequence then removes it.
Declaration
public Task RemoveBladeAsync(string bladeReference)
Parameters
Type | Name | Description |
---|---|---|
String | bladeReference | The reference of the blade to be removed. |
Returns
Type | Description |
---|---|
Task |
Events
| Improve this Doc View SourceBladeSetChanged
Invoked without arguments at the outset of a blade being added or removed from the bladeset.
Declaration
public event Action BladeSetChanged
Event Type
Type | Description |
---|---|
Action |