Class Theme
Represents a workbook theme with color scheme, font scheme, and format scheme.
Inherited Members
Namespace: DRIT.Spreadsheet.Drawing
Assembly: DRIT.Spreadsheet.dll
Syntax
public class Theme
Constructors
Theme()
Represents a workbook theme with color scheme, font scheme, and format scheme.
Declaration
public Theme()
Properties
Name
Gets the theme name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetThemeColor(SpreadsheetThemeColor)
Gets a theme color from the workbook's color scheme.
Declaration
public DrawingColor GetThemeColor(SpreadsheetThemeColor themeColor)
Parameters
| Type | Name | Description |
|---|---|---|
| SpreadsheetThemeColor | themeColor | The theme color type to retrieve. |
Returns
| Type | Description |
|---|---|
| DrawingColor | The color value, or null if not set. |
SetCustomTheme(string, DrawingColor[])
Sets a custom theme with the specified color array.
Declaration
public void SetCustomTheme(string name, DrawingColor[] colors)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name for the custom theme. |
| DrawingColor[] | colors | Array of 12 colors for the theme (Background1, Text1, Background2, Text2, Accent1-6, Hyperlink, FollowedHyperlink). |
SetThemeColor(SpreadsheetThemeColor, DrawingColor)
Sets a theme color in the workbook's color scheme.
Declaration
public void SetThemeColor(SpreadsheetThemeColor themeColor, DrawingColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| SpreadsheetThemeColor | themeColor | The theme color type to set. |
| DrawingColor | color | The color value to apply. |