Class BOBVariantComponentBase<TComponent, TVariant>
- Namespace
- BlazOrbit.Abstractions
- Assembly
- BlazOrbit.Core.dll
public abstract class BOBVariantComponentBase<TComponent, TVariant> : BOBComponentBase, IVariantComponent<TVariant>, IVariantComponent where TComponent : BOBVariantComponentBase<TComponent, TVariant> where TVariant : Variant
Type Parameters
TComponentTVariant
- Inheritance
-
objectComponentBaseBOBVariantComponentBase<TComponent, TVariant>
- Implements
-
IVariantComponent<TVariant>
- Derived
- Inherited Members
Constructors
BOBVariantComponentBase()
protected BOBVariantComponentBase()
Properties
BuiltInTemplates
protected abstract IReadOnlyDictionary<TVariant, Func<TComponent, RenderFragment>> BuiltInTemplates { get; }
Property Value
- IReadOnlyDictionary<TVariant, Func<TComponent, RenderFragment>>
CurrentVariant
Currently resolved variant instance.
public TVariant CurrentVariant { get; }
Property Value
- TVariant
DefaultVariant
Default variant used when no explicit variant is specified.
public abstract TVariant DefaultVariant { get; }
Property Value
- TVariant
Variant
Selected variant. null falls back to DefaultVariant.
[Parameter]
public TVariant? Variant { get; set; }
Property Value
- TVariant
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder builder)
Parameters
builderRenderTreeBuilderA Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder that will receive the render output.
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()