Class BOBToast
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBToast : BOBVariantComponentBase<BOBToast, BOBToastVariant>, IVariantComponent<BOBToastVariant>, IVariantComponent, IBuiltComponent, IHasElevation
- Inheritance
-
objectComponentBaseBOBToast
- Implements
- Inherited Members
Constructors
BOBToast()
public BOBToast()
Properties
BuiltInTemplates
Compile-time map of variants to their built-in render templates.
protected override Dictionary<BOBToastVariant, Func<BOBToast, RenderFragment>> BuiltInTemplates { get; }
Property Value
- Dictionary<BOBToastVariant, Func<BOBToast, RenderFragment>>
DefaultVariant
Variant used when no Variant is supplied.
public override BOBToastVariant DefaultVariant { get; }
Property Value
Elevation
Material Design elevation level (0–24) applied to the toast surface. Sets a derived shadow and lifts the surface in dark mode via a tint overlay. null (default) keeps the component-default shadow defined in CSS.
[Parameter]
public int? Elevation { get; set; }
Property Value
- int?
OnCloseAnimationComplete
Raised after the close animation finishes so the host can remove the toast from the active list.
[Parameter]
public EventCallback<Guid> OnCloseAnimationComplete { get; set; }
Property Value
- EventCallback<Guid>
State
Toast state (id, content, options, lifecycle flags) supplied by BOBToastHost.
[Parameter]
[EditorRequired]
public ToastState State { get; set; }
Property Value
Methods
BuildComponentCssVariables(Dictionary<string, string>)
Contributes additional CSS custom properties to the inline style attribute. Keys
that collide with framework-owned --bob-inline-* variables will be overwritten.
public void BuildComponentCssVariables(Dictionary<string, string> cssVariables)
Parameters
cssVariablesDictionary<string, string>
BuildComponentDataAttributes(Dictionary<string, object>)
Contributes additional data- attributes to the root element. Keys that collide
with framework-owned data-bob- attributes will be overwritten.
public void BuildComponentDataAttributes(Dictionary<string, object> dataAttributes)
Parameters
dataAttributesDictionary<string, object>
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder
Dispose()
public void Dispose()
OnInitialized()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
protected override void OnInitialized()
OnParametersSet()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
protected override void OnParametersSet()
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
protected override Task OnParametersSetAsync()
Returns
- Task
A System.Threading.Tasks.Task representing any asynchronous operation.