Class RadzenAppearanceToggle
Dark or light theme switch. Requires Radzen.Blazor.RadzenAppearanceToggle.ThemeService to be registered in the DI container.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenAppearanceToggle : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
RadzenAppearanceToggle()
Dark or light theme switch. Requires Radzen.Blazor.RadzenAppearanceToggle.ThemeService to be registered in the DI container.
Declaration
public RadzenAppearanceToggle()
Properties
ButtonStyle
Gets or sets the switch button style.
Declaration
[Parameter]
public ButtonStyle ButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
ButtonStyle | The switch button style. |
DarkTheme
Gets or sets the dark theme. Not set by default - the component uses the dark version of the current theme.
Declaration
[Parameter]
public string DarkTheme { get; set; }
Property Value
Type | Description |
---|---|
string |
LightTheme
Gets or sets the light theme. Not set by default - the component uses the light version of the current theme.
Declaration
[Parameter]
public string LightTheme { get; set; }
Property Value
Type | Description |
---|---|
string |
ToggleButtonStyle
Gets or sets the switch button toggled style.
Declaration
[Parameter]
public ButtonStyle ToggleButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
ButtonStyle | The switch button toggled style. |
ToggleShade
Gets or sets the switch button toggled shade.
Declaration
[Parameter]
public Shade ToggleShade { get; set; }
Property Value
Type | Description |
---|---|
Shade | The switch button toggled shade. |
Variant
Gets or sets the switch button variant.
Declaration
[Parameter]
public Variant Variant { get; set; }
Property Value
Type | Description |
---|---|
Variant | The switch button variant. |
Methods
BuildRenderTree(RenderTreeBuilder)
Dark or light theme switch. Requires Radzen.Blazor.RadzenAppearanceToggle.ThemeService to be registered in the DI container.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | __builder |
Overrides
Dispose()
Detaches event handlers and disposes Reference.
Declaration
public override void Dispose()
Overrides
OnInitialized()
Called by the Blazor runtime.
Declaration
protected override void OnInitialized()