Class CascadingValueSpec

A cascading value to supply to a component when it is rendered. The renderer wraps the previewed component in a CascadingValue<TValue> for each of these.

Inheritance
CascadingValueSpec
Namespace: BlazorToolkit.Previews
Assembly: BlazorToolkit.Previews.dll
Syntax
public sealed class CascadingValueSpec

Constructors

CascadingValueSpec(object?, Type, string?, bool)

Creates a cascading value specification.

Declaration
public CascadingValueSpec(object? value, Type valueType, string? name, bool isFixed)
Parameters
Type Name Description
object value
Type valueType
string name
bool isFixed

Properties

IsFixed

Whether the cascade is fixed (never changes) — enables a renderer optimization.

Declaration
public bool IsFixed { get; }
Property Value
Type Description
bool

Name

Optional cascade name (matches [CascadingParameter(Name = ...)]); null for unnamed.

Declaration
public string? Name { get; }
Property Value
Type Description
string

Value

The value passed down the cascade.

Declaration
public object? Value { get; }
Property Value
Type Description
object

ValueType

The declared type of the cascade (the TValue of CascadingValue<TValue>).

Declaration
public Type ValueType { get; }
Property Value
Type Description
Type