Skip to main content
A newer version of this page is available. .
Tab

CustomColorSchemes Class

Contains members used to create a new theme with custom CSS files.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public static class CustomColorSchemes

Remarks

The following example shows how to register a new theme for ASP.NET Web Forms Dashboard control.

  1. Create the folder in the project and put the CSS files in the created folder (for example, Content | custom-themes).

  2. Register the theme in the Global.asax file:

    using DevExpress.Web; 
    using DevExpress.DashboardWeb; 
    //... 
    
            protected void Application_Start() {
                //...
                CustomColorSchemes
                    .Configure("custom-themes")
                    .AddDevExtremeStyle(@"Content/custom-themes/dx.light-yellow.min.css")
                    .AddAnalyticsStyle(@"Content/custom-themes/dx-analytics.light-yellow.min.css")
                    .AddDashboardStyle(@"Content/custom-themes/dx-dashboard.light-yellow.min.css");
            }
    
  3. Use the ASPxWebClientUIControl.ColorScheme property to apply the custom theme to the Web Dashboard:

    protected void Page_Load(object sender, EventArgs e) {
        // ...
        ASPxDashboard1.ColorScheme = "light-yellow";
    }
    

    The same code in ASP.NET markup:

    <dx:ASPxDashboard ID="ASPxDashboard1" runat="server" ColorScheme="light-yellow"></dx:ASPxDashboard>
    

See Themes and Styles for detailed information about how to generate and register a custom theme for ASP.NET Web Forms Dashboard control.

Inheritance

Object
CustomColorSchemes
See Also