Class
ThemeColorScheme

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:

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public class ThemeColorScheme : NamedObjectBase, INamedObject, IEnumerable<ThemeColor>, IEnumerable

Inheritance: objectNamedObjectBaseThemeColorScheme

Implements: IEnumerableIEnumerable<ThemeColor>INamedObject

Inherited Members NamedObjectBase.Name

Constructors

ThemeColorScheme(string, Color, Color, Color, Color, Color, Color, Color, Color, Color, Color, Color, Color)

Initializes a new instance of the ThemeColorScheme class.

Declaration

cs-api-definition
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

string

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

cs-api-definition
public ThemeColor this[ThemeColorType colorType] { get; }

Parameters

colorType

ThemeColorType

Property Value

ThemeColor

The theme color.

Methods

Clone()

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

Declaration

cs-api-definition
public ThemeColorScheme Clone()

Returns

ThemeColorScheme

The cloned theme color scheme.

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

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)

GetEnumerator()

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

Declaration

cs-api-definition
public IEnumerator<ThemeColor> GetEnumerator()

Returns

IEnumerator<ThemeColor>

An enumerator for the theme colors.

Implements IEnumerable<ThemeColor>.GetEnumerator()

GetHashCode()

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

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current color scheme.

Overrides object.GetHashCode()

GetTintAndShade(ThemeColorType, ColorShadeType)

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

Declaration

cs-api-definition
public double GetTintAndShade(ThemeColorType themeColorType, ColorShadeType colorShadeType)

Parameters

themeColorType

ThemeColorType

Type of the theme color.

colorShadeType

ColorShadeType

Type of the color shade.

Returns

double

The tint and shade value.