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

Get Started

  • 2 minutes to read

This topic describes how to change MS Excel-inspired Office 2016 Colorful SE theme’s blue colors to green.

OfficeWord2Excel.png

Create a New Theme

  1. Run the Theme Designer. Open the Get Started Tab and select Create a New Theme.

    ThemeDesigner

  2. Select your new theme’s version and base theme. In this example, we select the Office 2016 Colorful SE theme and version 18.2.3.

    SelectOffice2016SeColor.png

  3. Specify a theme’s name (Colorful_Excel in this tutorial) and path.

    SetTheName

  4. Click Create.

The Theme Designer copies the Office 2016 Colorful SE base theme and adds it to the specified directory.

Edit a Theme

  1. Set up preview

    The Theme Designer allows you to preview the standard and DevExpress controls’ appearance with your theme applied.

    Click Build and select a control in the Navigation window to preview it.

    Build.png

    In this tutorial, we use the Spreadsheet control with Ribbon to preview changes.

    Navigation.png

  2. Change colors

    In the palette tab, select the blue colors and change the H (hue) value to 147 to make them green.

    colorEdit.png

    Refer to the WPF Theme Designer Tools for more information on advanced color editing tools.

  3. Edit XAML files

    Use the View in XAML tool to find an element declaration. You can enable this tool in the ribbon or use the Ctrl+D shortcut.

    Point to the element, hold down the Ctrl+Shift and click the element. Theme Designer open this element’s XAML code in the Code View window.

    Set the BorderThickness to 2 and the BorderBrush to $Border. Save the XAML file and build the theme to apply the changes.

    editing-border

Note

Refer to the Edit Theme in XAML topic for more information on how to edit themes in XAML files.

Save and Publish

Save your theme and click Publish.

Create-theme-publish

The Theme Designer publishes your theme and prompts you to open the output directory with .DLL and .PDB files.

msgBox.png

Apply the Theme to an Application

  1. Run Microsoft Visual Studio and open the WPF application.
  2. Add Reference to the theme’s .DLL assembly.

    AddReference.png

    SelectReferenceAssembly.png

  3. Add the following code to the App.xaml.cs file:

    static App() {
        var theme = new Theme("Colorful_Excel");
        theme.AssemblyName = "DevExpress.Xpf.Themes.Colorful_Excel.v18.2";
        Theme.RegisterTheme(theme);
        ApplicationThemeHelper.ApplicationThemeName = "Colorful_Excel";
    }
    
  4. Run the application.