Skip to content

Light & Dark

SukiUI use the Theme Variant system provided by AvaloniaUI.

However, the SukiTheme class provide a wrapper to change Light/Dark theme.

Theme

Dark

dark theme

Light

light theme

Switch to Dark Theme

csharp
SukiTheme.GetInstance().ChangeBaseTheme(ThemeVariant.Dark);

Switch to Light Theme

csharp
SukiTheme.GetInstance().ChangeBaseTheme(ThemeVariant.Light);

Switch between Light/Dark Theme

csharp
SukiTheme.GetInstance().SwitchBaseTheme();

ThemeChanged Event

csharp
SukiTheme.GetInstance().OnBaseThemeChanged += variant =>
{
    Console.WriteLine("Theme changed triggered !");
};