8using System.Collections.Generic;
66 public string Name {
get;
set; }
85 this.Colors = GetDefaultColorScheme();
93 internal static Theme GetDefaultTheme()
99 ColorScheme colors = GetDefaultColorScheme();
100 theme.Colors = colors;
108 internal static ColorScheme GetDefaultColorScheme()
110 ColorScheme colors =
new ColorScheme
113 Dark1 =
new SystemColor(SystemColor.Value.WindowText),
114 Light1 =
new SystemColor(SystemColor.Value.Window,
"FFFFFF"),
115 Dark2 =
new SrgbColor(
"44546A"),
116 Light2 =
new SrgbColor(
"E7E6E6"),
117 Accent1 =
new SrgbColor(
"4472C4"),
118 Accent2 =
new SrgbColor(
"ED7D31"),
119 Accent3 =
new SrgbColor(
"A5A5A5"),
120 Accent4 =
new SrgbColor(
"FFC000"),
121 Accent5 =
new SrgbColor(
"5B9BD5"),
122 Accent6 =
new SrgbColor(
"70AD47"),
136 return obj is
Theme theme &&
137 Name == theme.Name &&
138 EqualityComparer<ColorScheme>.Default.Equals(
Colors, theme.Colors);
151 int hashCode = 1172093127;
152 hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(
Name);
153 hashCode = hashCode * -1521134295 + EqualityComparer<ColorScheme>.Default.GetHashCode(
Colors);
Class representing a color scheme, used in a theme.
Class representing an Office theme.
override int GetHashCode()
Returns a hash code for this instance.
ColorSchemeElement
Enum to define the sequence index of color scheme element, used in the implementations of Interfaces....
@ FollowedHyperlink
Followed Hyperlink.
ColorScheme Colors
Gets or sets the ColorScheme of the theme.
const string DefaultThemeVersion
Default theme ID, stated in the workbook document.
string Name
Gets or sets the name of the theme.
override bool Equals(object obj)
Returns whether two instances are the same.
bool DefaultTheme
Gets whether the theme is defined as copy or reference to the application default theme.
Theme(string name)
Constructor with parameters. Using this constructor initialized the Colors property with valid defaul...