Service for theme registration and management.
Object
Namespace: Radzen
Assembly: Radzen.Blazor.dll
public class ThemeServiceService for theme registration and management.
public ThemeService(Microsoft.JSInterop.IJSRuntime jsRuntime, IServiceProvider serviceProvider)
| Type | Name | Description |
|---|---|---|
| Microsoft.JSInterop.IJSRuntime | jsRuntime | |
| IServiceProvider | serviceProvider |
Specify if the theme should be right-to-left.
public bool? RightToLeft { get; }
| Type | Description |
|---|---|
| bool? | Specify if the theme should be right-to-left. |
Gets the current theme.
public string Theme { get; }
| Type | Description |
|---|---|
| string | Gets the current theme. |
Specify if the theme colors should meet WCAG contrast requirements.
public bool? Wcag { get; }
| Type | Description |
|---|---|
| bool? | Specify if the theme colors should meet WCAG contrast requirements. |
Specifies if the theme should be right-to-left.
public void SetRightToLeft(bool rightToLeft)
| Type | Name | Description |
|---|---|---|
| bool | rightToLeft |
Changes the current theme.
public void SetTheme(string theme, bool triggerChange)
| Type | Name | Description |
|---|---|---|
| string | theme | |
| bool | triggerChange |
Changes the current theme.
public void SetTheme(ThemeOptions options)
| Type | Name | Description |
|---|---|---|
| ThemeOptions | options |
Enables or disables WCAG contrast requirements.
public void SetWcag(bool wcag)
| Type | Name | Description |
|---|---|---|
| bool | wcag |