VegaRise.NET
HomeAPI Reference
Back to DOM

ActiveThemeClass

Definition

Namespace
DOM.Styles
Assembly
DOM.dll

Holds the currently active theme for the process-wide document pipeline.

Remarks

is an internal, static holder used by the document pipeline to track which instance is currently applied. It backs the public façade operations and . ActiveTheme Theme VDocs.SetActiveTheme(name) VDocs.GetActiveTheme() This type is intentionally not part of the public API — consumers should always interact with the active theme through the façade so that change tracking, license validation, and serialization hooks are honoured. Because the storage is static, an application that processes multiple documents concurrently should ensure it does not mutate this value across document boundaries (for example by using per-document theme application through the façade rather than writing here directly).

Examples

csharp
1// 1. Typical usage inside the pipeline:
2// the active theme is set through the facade, not directly.
3var doc = new VDocs();
4doc.SetActiveTheme("Office");
5var current = doc.GetActiveTheme();
6
csharp
1// 2. Reading the active theme from library code:
2// internal components should consult ActiveTheme.Theme.
3var theme = ActiveTheme.Theme;
4if (theme != null)
5{
6 Console.WriteLine(theme.Name);
7}
8
csharp
1// 3. Resetting the active theme (internal use only).
2// Not intended for external consumers.
3ActiveTheme.Theme = null;
4
csharp
1// 4. Prefer the façade for all external operations:
2// it guarantees license validation and serialization hooks.
3var doc = new VDocs();
4doc.SetActiveTheme("Apex");
5

Properties

Theme

Gets or sets the theme that is currently active for the document pipeline.