Class ThemableColor
Represents a color which can be used in a theme.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Core.dll
Syntax
public class ThemableColor : IThemableObject<Color>
Constructors
ThemableColor(Color)
Initializes a new instance of the ThemableColor class.
Declaration
public ThemableColor(Color color)
Parameters
System.Windows.Media.Color
color
The color. |
ThemableColor(Color, Boolean)
Initializes a new instance of the ThemableColor class.
Declaration
public ThemableColor(Color color, bool isAutomatic)
Parameters
System.Windows.Media.Color
color
The color. |
System.Boolean
isAutomatic
The is automatic. |
ThemableColor(ThemeColorType, Double)
Initializes a new instance of the ThemableColor class.
Declaration
public ThemableColor(ThemeColorType themeColorType, double tintAndShade)
Parameters
ThemeColorType
themeColorType
Theme color type. |
System.Double
tintAndShade
The tint and shade. |
ThemableColor(ThemeColorType, Nullable<ColorShadeType>)
Initializes a new instance of the ThemableColor class.
Declaration
public ThemableColor(ThemeColorType themeColorType, ColorShadeType? colorShadeType = default(ColorShadeType? ))
Parameters
ThemeColorType
themeColorType
The theme color type. |
System.Nullable<ColorShadeType>
colorShadeType
The color shade type. |
Properties
ColorShadeType
Gets the color shade type.
Declaration
public ColorShadeType? ColorShadeType { get; }
Property Value
System.Nullable<ColorShadeType>
The color shade type. |
IsAutomatic
Gets the value indicating if the color is automatic. Automatic colors may be modified by a consumer as appropriate.
Declaration
public bool IsAutomatic { get; }
Property Value
System.Boolean
Value indicating if the color is automatic. |
IsFromTheme
Gets the value indicating if the instance is from a theme.
Declaration
public bool IsFromTheme { get; }
Property Value
System.Boolean
The value indicating if the instance is from a theme. |
Implements
LocalValue
Gets the local value of the color.
Declaration
public Color LocalValue { get; }
Property Value
System.Windows.Media.Color
|
Implements
ThemeColorType
Gets the theme color type.
Declaration
public ThemeColorType ThemeColorType { get; }
Property Value
ThemeColorType
The theme color type. |
TintAndShade
Gets the tint and shade.
Declaration
public double? TintAndShade { get; }
Property Value
System.Nullable<System.Double>
The tint and shade. |
Methods
Equals(Object)
Determines whether the specified System.Object is equal to the current System.Object.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
The System.Object to compare with the current System.Object. |
Returns
System.Boolean
True if the specified System.Object is equal to the current System.Object; otherwise, false. |
Overrides
FromArgb(Byte, Byte, Byte, Byte)
Creates new themable color from Argb.
Declaration
public static ThemableColor FromArgb(byte alfa, byte red, byte green, byte blue)
Parameters
System.Byte
alfa
The alfa. |
System.Byte
red
The red. |
System.Byte
green
The green. |
System.Byte
blue
The blue. |
Returns
ThemableColor
|
FromColor(Color)
Converts System.Windows.Media.Color to ThemableColor.
Declaration
public static ThemableColor FromColor(Color value)
Parameters
System.Windows.Media.Color
value
The System.Windows.Media.Color. |
Returns
ThemableColor
The ThemableColor. |
GetActualValue(DocumentTheme)
Gets the actual value.
Declaration
public Color GetActualValue(DocumentTheme theme)
Parameters
DocumentTheme
theme
The theme. |
Returns
System.Windows.Media.Color
The actual value. |
Implements
GetActualValue(ThemeColorScheme)
Gets the actual value.
Declaration
public Color GetActualValue(ThemeColorScheme colorScheme)
Parameters
ThemeColorScheme
colorScheme
The color scheme. |
Returns
System.Windows.Media.Color
The actual color. |
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
System.Int32
A hash code for the current System.Object. |
Overrides
ToString()
Returns a System.String that represents the current System.Object.
Declaration
public override string ToString()
Returns
System.String
A System.String that represents the current System.Object. |
Overrides
Operators
Equality(ThemableColor, ThemableColor)
Compares two themable colors.
Declaration
public static bool operator ==(ThemableColor first, ThemableColor second)
Parameters
ThemableColor
first
The first themable color. |
ThemableColor
second
The second themable color. |
Returns
System.Boolean
If the two themable colors are equal. |
Explicit(Color to ThemableColor)
Explicitly cast color to themable color.
Declaration
public static explicit operator ThemableColor(Color value)
Parameters
System.Windows.Media.Color
value
The color. |
Returns
ThemableColor
Themable color. |
Inequality(ThemableColor, ThemableColor)
Compares two themable colors.
Declaration
public static bool operator !=(ThemableColor first, ThemableColor second)
Parameters
ThemableColor
first
The first themable color. |
ThemableColor
second
The second themable color. |
Returns
System.Boolean
If the two themable colors are equal. |