Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class ThemeService

    Service for theme registration and management.

    Inheritance
    object
    ThemeService
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen
    Assembly: Radzen.Blazor.dll
    Syntax
    public class ThemeService

    Constructors

    ThemeService()

    Service for theme registration and management.

    Declaration
    public ThemeService()

    Properties

    RightToLeft

    Specify if the theme should be right-to-left.

    Declaration
    public bool? RightToLeft { get; }
    Property Value
    Type Description
    bool?

    Theme

    Gets the current theme.

    Declaration
    public string Theme { get; }
    Property Value
    Type Description
    string

    Wcag

    Specify if the theme colors should meet WCAG contrast requirements.

    Declaration
    public bool? Wcag { get; }
    Property Value
    Type Description
    bool?

    Methods

    SetRightToLeft(bool)

    Specifies if the theme should be right-to-left.

    Declaration
    public void SetRightToLeft(bool rightToLeft)
    Parameters
    Type Name Description
    bool rightToLeft

    SetTheme(ThemeOptions)

    Changes the current theme with additional options.

    Declaration
    public void SetTheme(ThemeOptions options)
    Parameters
    Type Name Description
    ThemeOptions options

    SetTheme(string, bool)

    Changes the current theme.

    Declaration
    public void SetTheme(string theme, bool triggerChange = true)
    Parameters
    Type Name Description
    string theme
    bool triggerChange

    SetWcag(bool)

    Enables or disables WCAG contrast requirements.

    Declaration
    public void SetWcag(bool wcag)
    Parameters
    Type Name Description
    bool wcag

    Events

    ThemeChanged

    Raised when the theme changes.

    Declaration
    public event Action ThemeChanged
    Event Type
    Type Description
    Action

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT