Class Constants
A static class containing global constants for the application.
Inheritance
Namespace: IronWord.Models.Common
Assembly: IronWord.dll
Syntax
public static class Constants : Object
The fallback values IronWord applies when you do not set one yourself live on Constants, a static class of global defaults for the library. Reading from it tells you what the engine will use before any explicit styling is applied, which is useful when you want your code to match or deliberately override a built-in value.
You never construct this type; you read its fields directly through the class name. It sits at the configuration edge of the workflow rather than inside the build-and-save sequence, supplying reference values that styling and content code can compare against.
The field exposed today is DefaultTextColor, a const string set to the hex value 0015ef, the color text takes when no other color is assigned. Because it is a compile-time constant you can use it anywhere a hex color string is expected, for example to detect text still using the default or to reset a run to it. Read it as Constants.DefaultTextColor and pass it where IronWord accepts a color string.
string fallbackColor = Constants.DefaultTextColor;The add styled text how-to covers applying color and other formatting, and the add text how-to covers writing content.
Fields
DefaultTextColor
The default text color used throughout the application.
Declaration
public const string DefaultTextColor = "0015ef"
Field Value
| Type | Description |
|---|---|
| System.String |