ClassThemeColorScheme
Defines the mapping from theme color categories to concrete colors and exposes shade/tint helpers.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Theming
Assembly:Telerik.Windows.Documents.Core.dll
Syntax:
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public class ThemeColorScheme : NamedObjectBase, INamedObject, IEnumerable<ThemeColor>, IEnumerable
Inheritance: objectNamedObjectBaseThemeColorScheme
Implements:
Inherited Members
Constructors
ThemeColorScheme(string, Color, Color, Color, Color, Color, Color, Color, Color, Color, Color, Color, Color)
Initializes a new instance of the ThemeColorScheme class.
Declaration
public ThemeColorScheme(string name, Color background1, Color text1, Color background2, Color text2, Color accent1, Color accent2, Color accent3, Color accent4, Color accent5, Color accent6, Color hyperlink, Color followedHyperlink)
Parameters
name
The name.
background1
Color
The first background.
text1
Color
The first text color.
background2
Color
The second background.
text2
Color
The second text color.
accent1
Color
The first accent.
accent2
Color
The second accent.
accent3
Color
The third accent.
accent4
Color
The fourth accent.
accent5
Color
The fifth accent.
accent6
Color
The sixth accent.
hyperlink
Color
The hyperlink color.
followedHyperlink
Color
The followed hyperlink color.
Properties
this[ThemeColorType]
Gets the ThemeColor with the specified color type. Returns the theme color mapped for that category.
Declaration
public ThemeColor this[ThemeColorType colorType] { get; }
Parameters
colorType
Property Value
The theme color.
Methods
Clone()
Create a deep copy of the color scheme, duplicating all color mappings.
Declaration
public ThemeColorScheme Clone()
Returns
The cloned theme color scheme.
Equals(object)
Determines whether the specified object is equal to this color scheme.
Declaration
public override bool Equals(object obj)
Parameters
obj
The object to compare with the current color scheme.
Returns
True if the specified object is a ThemeColorScheme whose mapped theme colors match by category; otherwise, false.
Overrides
GetEnumerator()
Returns an enumerator that iterates through the theme colors in this scheme.
Declaration
public IEnumerator<ThemeColor> GetEnumerator()
Returns
An enumerator for the theme colors.
Implements
GetHashCode()
Returns a hash code for this color scheme based on its color mappings.
Declaration
public override int GetHashCode()
Returns
A hash code for the current color scheme.
Overrides
GetTintAndShade(ThemeColorType, ColorShadeType)
Compute the tint/shade adjustment for a given theme color and shade step.
Declaration
public double GetTintAndShade(ThemeColorType themeColorType, ColorShadeType colorShadeType)
Parameters
themeColorType
Type of the theme color.
colorShadeType
Type of the color shade.
Returns
The tint and shade value.