Class DocumentTheme
The document theme (the theme part): font scheme, color scheme and format scheme. When the document has no theme part, Word's Office defaults apply (Aptos Display / Aptos, the Office 2023 colour set), which CreateOfficeDefault() reproduces.
public sealed class DocumentTheme : UnknownXmlHost
- Inheritance
-
DocumentTheme
- Inherited Members
Constructors
Properties
- Colors
Gets or sets the color scheme. Never null.
- Formats
Gets or sets the format scheme (a:fmtScheme). Never null.
- MajorFonts
Gets or sets the major (heading) font set. Never null.
- MinorFonts
Gets or sets the minor (body) font set. Never null.
- RawXml
Gets or sets the complete preserved a:theme outer XML, or null for a theme that was not read from a package.
The typed members above cover the parts of a theme DocWright resolves — the color scheme, the font sets, and as much of the format scheme as the shape engine uses. A real theme part holds a great deal more (effect styles, background fill styles, extension lists, per-script font tables), so the typed members are a projection, not a representation. Keeping the source text alongside them is what lets a writer reproduce the part exactly instead of rebuilding a lossy approximation of it.
Methods
- Clone()
Creates a deep copy.
- CreateOfficeDefault()
Creates the Office default theme used when a document carries no theme part: the current Office theme (Aptos Display major, Aptos minor, the Office 2023 colour set).