Skip to main content
A newer version of this page is available. .
All docs
V21.1
.NET Framework 4.5.2+
Row

WorkbookTheme.Load(Stream) Method

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

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v21.1.Core.dll

Declaration

void Load(
    Stream stream
)

Parameters

Name Type Description
stream Stream

A stream that contains a THMX file with 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;
using System.IO;
// ...

WorkbookTheme docTheme = workbook.Theme;
using (FileStream stream = File.Open(@"CustomThemes\Quotable.thmx", FileMode.Open))
    docTheme.Load(stream);
See Also