Skip to main content
All docs
V24.2
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WorkbookTheme.Load(String) Method

Loads a custom theme from a THMX file and applies it to the document.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

void Load(
    string fileName
)

#Parameters

Name Type Description
fileName String

A path to the THMX file that contains a theme definition.

#Remarks

In Microsoft® Excel®, you can save a document theme as a .thmx file to reuse this theme in other documents. Refer to the following topic for details: Save a Custom Theme for Reuse. The WorkbookTheme.Load method allows you to load a file with a custom theme and to apply it to your workbook.

The following code snippet applies the Quotable theme to the document:

Quotable document theme

using DevExpress.Spreadsheet;
// ...

WorkbookTheme docTheme = workbook.Theme;
docTheme.Load(@"CustomThemes\Quotable.thmx");
See Also