Back to Devexpress

ThemeProperties Class

blazor-devexpress-dot-blazor-2c92450e.md

latest2.3 KB
Original Source

ThemeProperties Class

Contains theme properties.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.Resources.v25.2.dll

NuGet Package : DevExpress.Blazor.Resources

Declaration

csharp
public class ThemeProperties

Remarks

Call the RegisterTheme(ITheme) method in the App.razor file to register a theme in your Blazor application.

Call the DxTheme.Clone() method and pass a ThemeProperties object as a parameter to clone a built-in classic theme ( Blazing Berry , Blazing Dark , Office White or Purple ) or apply a Bootstrap theme.

Available options include:

NameSpecifies the theme name. Serves as a unique theme identifier.AddFilePaths(String[])Adds stylesheets to a theme and loads them when applying the theme.

razor
<head>
    @*...*@
    @DxResourceManager.RegisterTheme(Themes.OfficeWhite.Clone(properties => {
        properties.Name = "Office White Custom";
        properties.AddFilePaths("css/OWCustomStyles.css")
    }))
</head>
razor
<head>
    @*...*@
    @DxResourceManager.RegisterTheme(Themes.BootstrapExternal.Clone(properties => {
        properties.Name = "Pulse Bootswatch";
        properties.AddFilePaths("css/pulse/bootstrap.min.css");
    }))
</head>

To customize and apply a Fluent-based theme, pass a ThemeFluentProperties object to the DxThemeFluent.Clone() method.

Inheritance

Object ThemeProperties ThemeFluentProperties

See Also

ThemeProperties Members

DevExpress.Blazor Namespace