Theme class

Office 2013 and later

Theme. The root element of ThemePart. When the object is serialized out as xml, its qualified name is a:theme.

Namespace:  DocumentFormat.OpenXml.Drawing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class Theme : OpenXmlPartRootElement

[ISO/IEC 29500-1 1st Edition]

theme (Theme)

This element defines the root level complex type associated with a shared style sheet (or theme). This element holds all the different formatting options available to a document through a theme and defines the overall look and feel of the document when themed objects are used within the document.

[Example: Consider the following image as an example of different themes in use applied to a presentation:

In this example, we see how a theme can affect font, colors, backgrounds, fills, and effects for different objects in a presentation. end example]

Parent Elements

Root element of DrawingML Theme part

Child Elements


custClrLst (Custom Color List)


extLst (Extension List)


extraClrSchemeLst (Extra Color Scheme List)


objectDefaults (Object Defaults)


themeElements (Theme Elements)




name (Name)

Specifies the name given to the theme.

The possible values for this attribute are defined by the W3C XML Schema string datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_OfficeStyleSheet) is located in §A.4.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.