[]
Initializes a new instance of the Theme class with the specified theme name and base theme.
Creates a custom theme by copying settings from the specified base ITheme. If
baseTheme is null, the new theme is initialized from the Office theme.
The theme name must be unique and must not be empty or match a built-in theme name.
public Theme(string themeName, ITheme baseTheme = null)
Public Sub New(themeName As String, Optional baseTheme As ITheme = Nothing)
| Type | Name | Description |
|---|---|---|
| string | themeName | The name of the theme. Must not be |
| ITheme | baseTheme | The base theme to initialize from. If |
Theme theme = new Theme("CustomTheme", Themes.Berlin);
theme.ThemeColorScheme[ThemeColor.Accent1].RGB = Color.Blue;
workbook.Theme = theme;
| Type | Condition |
|---|---|
| ArgumentException | if |