This topic describes how to create a custom theme based on the Office 2016 Colorful SE theme with the look-and-feel of an MS Excel application. In this topic, we will change the theme's blue contrast colors to green.
Run the Theme Designer. Open the Get Started Tab and select Create a New Theme.
Select a base theme and version for your new theme. In this example, we select the Office 2016 Colorful SE theme and 18.2.3 version.
Specify the theme name (Colorful_Excel in this tutorial) and location.
The Theme Designer clones the Office 2016 Colorful SE theme and places the copy in the specified directory.
Set up preview
Click Build to enable preview. Select a control to preview.
The Theme Designer allows you to see how the new theme is applied to all the standard and DevExpress controls.
The Navigation window allows you to select the required control to preview.
In this tutorial, we use the Spreadsheet control to preview changes.
In the palette tab, select all the blue colors and change them to green. You can edit them in HSB color mode and change the H (hue) value to 147.
Refer to the WPF Theme Designer Tools for more information about advanced color editing tools.
XAML files editing
Use the View in XAML tool to find an element location in XAML. Click the ribbon icon or use the Ctrl+D shortcut to enable this tool.
Point to an element, hold down the Ctrl+Shift keys combination and click an element. Theme Designer will 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 to apply changes.
Refer to the Edit Theme in XAML topic for more information about theme editing in XAML files.
Save your modified theme and click Publish.
The Theme Designer builds your theme and prompts you to open the output directory with the built .DLL and .PDB files.
Click Yes to open the output directory with your built theme assembly.
Follow the steps below to apply this theme to an application.
Add a reference to the theme assembly in this solution. To do this, right-click References in the Solution Explorer and select Add Reference. In the Browse section, locate the assembly built in the previous step.
Add the following code to the App.xaml.cs file.