Class BOBToast
- Namespace
- BlazOrbit.Components.Layout
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBToast : BOBVariantComponentBase<BOBToast, BOBToastVariant>, IVariantComponent<BOBToastVariant>, IVariantComponent, IHasElevation
- Inheritance
-
objectComponentBaseBOBToast
- Implements
- Inherited Members
Constructors
BOBToast()
public BOBToast()
Properties
BuiltInTemplates
protected override Dictionary<BOBToastVariant, Func<BOBToast, RenderFragment>> BuiltInTemplates { get; }
Property Value
- Dictionary<BOBToastVariant, Func<BOBToast, RenderFragment>>
DefaultVariant
Default variant used when no explicit variant is specified.
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>)
Override this method in derived components to add custom CSS variables. These will be merged with the standard behavior CSS variables. This method is called from BOBComponentAttributesBuilder during the style building process.
public override void BuildComponentCssVariables(Dictionary<string, string> cssVariables)
Parameters
cssVariablesDictionary<string, string>Dictionary to add CSS variables to
BuildComponentDataAttributes(Dictionary<string, object>)
Override this method to add component-specific data attributes. Called during attribute building process.
public override 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.