# ThemeService Class

Service for theme registration and management.

Namespace: [Radzen](https://blazor.radzen.com/docs/api/Radzen.md)

Assembly: Radzen.Blazor.dll

## Inheritance

- Object
- ThemeService

## Syntax

```csharp
public class ThemeService
```

## Constructors

| Constructor | Description |
|-------------|-------------|
| `public ThemeService(Microsoft.JSInterop.IJSRuntime jsRuntime, IServiceProvider serviceProvider)` | Service for theme registration and management. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| CssPath | `string` | Custom css path. If set, it overwrites the default path. |
| RightToLeft | `bool?` | Specify if the theme should be right-to-left. |
| Theme | `string` | Gets the current theme. |
| Wcag | `bool?` | Specify if the theme colors should meet WCAG contrast requirements. |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `SetCssPath(string cssPath)` | `void` | Sets a specific css path to the theme service. Parameters: `cssPath`: New css path to look for themes. |
| `SetRightToLeft(bool rightToLeft)` | `void` | Specifies if the theme should be right-to-left. |
| `SetTheme(ThemeOptions options)` | `void` | Changes the current theme. |
| `SetTheme(string theme, bool triggerChange)` | `void` | Changes the current theme. |
| `SetWcag(bool wcag)` | `void` | Enables or disables WCAG contrast requirements. |

## Events

| Event | Type | Description |
|------|------|-------------|
| ThemeChanged | `Action` | Raised when the theme changes. |

