Dark or light theme switch. Requires ThemeService to be registered in the DI container.
IComponent
IHandleEvent
IHandleAfterRender
RadzenComponent.GetComponentCssClass
RadzenComponent.SetParametersAsync
RadzenComponent.OnAfterRenderAsync
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenAppearanceToggle : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRenderDark or light theme switch. Requires ThemeService to be registered in the DI container.
public RadzenAppearanceToggle()Gets or sets the switch button style.
public ButtonStyle ButtonStyle { get; set; }
| Type | Description |
|---|---|
| ButtonStyle | Gets or sets the switch button style. |
Gets or sets the dark theme. Not set by default - the component uses the dark version of the current theme.
public string DarkTheme { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the dark theme. Not set by default - the component uses the dark version of the current theme. |
Gets or sets the light theme. Not set by default - the component uses the light version of the current theme.
public string LightTheme { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the light theme. Not set by default - the component uses the light version of the current theme. |
Gets or sets the switch button toggled style.
public ButtonStyle ToggleButtonStyle { get; set; }
| Type | Description |
|---|---|
| ButtonStyle | Gets or sets the switch button toggled style. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |