New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public class ThemeColorScheme : NamedObjectBase, INamedObject, IEnumerable<ThemeColor>, IEnumerable

Inheritance: objectNamedObjectBaseThemeColorScheme

Implements: IEnumerableIEnumerable<ThemeColor>INamedObject

Inherited Members NamedObjectBase.Name

Constructors

Initializes a new instance of the ThemeColorScheme class.

C#
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:namestring

The name.

background1Color

The first background.

text1Color

The first text color.

background2Color

The second background.

text2Color

The second text color.

accent1Color

The first accent.

accent2Color

The second accent.

accent3Color

The third accent.

accent4Color

The fourth accent.

accent5Color

The fifth accent.

accent6Color

The sixth accent.

hyperlinkColor

The hyperlink color.

followedHyperlinkColor

The followed hyperlink color.

Methods

Create a deep copy of the color scheme, duplicating all color mappings.

C#
public ThemeColorScheme Clone()
Returns:

ThemeColorScheme

The cloned theme color scheme.

Determines whether the specified object is equal to this color scheme.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current color scheme.

Returns:

bool

True if the specified object is a ThemeColorScheme whose mapped theme colors match by category; otherwise, false.

Overrides: object.Equals(object)

Returns an enumerator that iterates through the theme colors in this scheme.

C#
public IEnumerator<ThemeColor> GetEnumerator()
Returns:

IEnumerator<ThemeColor>

An enumerator for the theme colors.

Implements: IEnumerable<ThemeColor>.GetEnumerator()

Returns a hash code for this color scheme based on its color mappings.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current color scheme.

Overrides: object.GetHashCode()

Compute the tint/shade adjustment for a given theme color and shade step.

C#
public double GetTintAndShade(ThemeColorType themeColorType, ColorShadeType colorShadeType)
Parameters:themeColorTypeThemeColorType

Type of the theme color.

colorShadeTypeColorShadeType

Type of the color shade.

Returns:

double

The tint and shade value.

Properties

Gets the ThemeColor with the specified color type. Returns the theme color mapped for that category.

C#
public ThemeColor this[ThemeColorType colorType] { get; }
Parameters:colorTypeThemeColorTypeProperty Value:

The theme color.