Accent color
# CascadingValueProvider ## Description BitCascadingValueProvider makes it easy to push multiple cascading values to child components without nesting several CascadingValue components manually. ## Parameters | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | ChildContent | `RenderFragment?` | null | The content to which the values should be provided. | | Values | `IEnumerable<BitCascadingValue>?` | null | The cascading values to be provided for the children. | | ValueList | `BitCascadingValueList?` | null | The cascading value list to be provided for the children. | ## Sub Classes ### BitCascadingValue Properties Defines a value that can be cascaded to descendant components. | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | Value | `object?` | null | The value to be provided. | | Name | `string?` | null | The optional name of the cascading value. | | IsFixed | `bool` | false | If true, indicates that Value will not change. | | ValueType | `Type` | Value?.GetType() | The type to use as the TValue of the CascadingValue component. | ### BitCascadingValueList Properties A helper class to ease the using of a list of the BitCascadingValue. | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | Add<T>(T value, string? name = null, bool isFixed = false) | `void` | | Adds a typed BitCascadingValue to the list. | ## Examples \n**Basic**: ```razor ``` \n**Values**: ```razor Switch to @nextTheme theme Add notification (@notificationCount) ``` ```csharp private bool isAuthenticated = true; private string currentTheme = "Light"; private int notificationCount = 2; private string userName = "Ava Smith"; private string userRole = "Product manager"; private string nextTheme => currentTheme == "Light" ? "Dark" : "Light"; private IEnumerable values => [ (currentTheme, "Theme"), (isAuthenticated, "IsAuthenticated"), (notificationCount, "NotificationCount"), new (new CascadingDemoUser("Saleh Xafan", "CTO"), "NamedUser"), new (new CascadingDemoUser(userName, userRole)) ]; ``` \n**ValueList**: ```razor ``` ```csharp private readonly string? nullableTheme = null; private readonly bool? nullableIsAuthenticated = null; private readonly int? nullableNotificationCount = null; private readonly CascadingDemoUser? nullableNamedUser = null; private readonly CascadingDemoUser? nullableTypedUser = null; ```