Class WorkbookColorInfo
An immutable object which represents a color in a Microsoft Excel workbook.
Inheritance
Namespace: Infragistics.Documents.Excel
Assembly: IgniteUI.Blazor.Documents.Excel.dll
Syntax
public sealed class WorkbookColorInfo : Object
Constructors
WorkbookColorInfo(Color)
Creates a new WorkbookColorInfo with the specified Color.
Declaration
public WorkbookColorInfo(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The color which should be displayed when the WorkbookColorInfo is used. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
WorkbookColorInfo(Color, WorkbookColorTransform)
Creates a new WorkbookColorInfo with the specified Color and WorkbookColorTransform.
Declaration
public WorkbookColorInfo(Color color, WorkbookColorTransform transform)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The base color which should be displayed when the WorkbookColorInfo is used. |
WorkbookColorTransform | transform | A WorkbookColorTransform instance which defines the color transforms to be applied. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
WorkbookColorInfo(Color, Double)
Creates a new WorkbookColorInfo with the specified Color and tint.
Declaration
public WorkbookColorInfo(Color color, double tint)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The base color which should be displayed when the WorkbookColorInfo is used. |
System.Double | tint | The tint to apply to the base color, from -1.0 (100% darken) to 1.0 (100% lighten). |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
System.ArgumentOutOfRangeException |
|
WorkbookColorInfo(WorkbookThemeColorType)
Creates a new WorkbookColorInfo with the specified theme color.
Declaration
public WorkbookColorInfo(WorkbookThemeColorType themeColorType)
Parameters
Type | Name | Description |
---|---|---|
WorkbookThemeColorType | themeColorType | The type of theme color which should be displayed when the WorkbookColorInfo is used. |
Exceptions
Type | Condition |
---|---|
System.ComponentModel.InvalidEnumArgumentException |
|
WorkbookColorInfo(WorkbookThemeColorType, WorkbookColorTransform)
Creates a new WorkbookColorInfo with the specified theme color and WorkbookColorTransform.
Declaration
public WorkbookColorInfo(WorkbookThemeColorType themeColorType, WorkbookColorTransform transform)
Parameters
Type | Name | Description |
---|---|---|
WorkbookThemeColorType | themeColorType | The type of theme color which should be the base color when the WorkbookColorInfo is used. |
WorkbookColorTransform | transform | A WorkbookColorTransform instance which defines the color transforms to be applied. |
Exceptions
Type | Condition |
---|---|
System.ComponentModel.InvalidEnumArgumentException |
|
WorkbookColorInfo(WorkbookThemeColorType, Double)
Creates a new WorkbookColorInfo with the specified theme color and tint.
Declaration
public WorkbookColorInfo(WorkbookThemeColorType themeColorType, double tint)
Parameters
Type | Name | Description |
---|---|---|
WorkbookThemeColorType | themeColorType | The type of theme color which should be the base color when the WorkbookColorInfo is used. |
System.Double | tint | The tint to apply to the base color, from -1.0 (100% darken) to 1.0 (100% lighten). |
Exceptions
Type | Condition |
---|---|
System.ComponentModel.InvalidEnumArgumentException |
|
System.ArgumentOutOfRangeException |
|
Properties
Automatic
Gets the automatic color, which is the window text system color.
Declaration
public static WorkbookColorInfo Automatic { get; }
Property Value
Type | Description |
---|---|
WorkbookColorInfo |
See Also
Color
Gets the base color associated of the WorkbookColorInfo.
Declaration
public Nullable<Color> Color { get; }
Property Value
Type | Description |
---|---|
System.Nullable<Color> |
See Also
IsAutomatic
Gets the value which indicates whether the WorkbookColorInfo is automatic, or the window text system color.
Declaration
public bool IsAutomatic { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ThemeColorType
Gets the base theme color associated of the WorkbookColorInfo.
Declaration
public Nullable<WorkbookThemeColorType> ThemeColorType { get; }
Property Value
Type | Description |
---|---|
System.Nullable<WorkbookThemeColorType> |
See Also
Tint
Gets the to apply to the base color, from -1.0 (100% darken) to 1.0 (100% lighten).
Declaration
public Nullable<double> Tint { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
See Also
Transform
Returns the associated WorkbookColorTransform, or null if this instance is not associated with a transform.
Declaration
public WorkbookColorTransform Transform { get; }
Property Value
Type | Description |
---|---|
WorkbookColorTransform |
Methods
Equals(Object)
Determines whether the WorkbookColorInfo is equal to the specified object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to test for equality. |
Returns
Type | Description |
---|---|
System.Boolean | True if the object is equal to this instance; False otherwise. |
GetHashCode()
Gets the hash code for the WorkbookColorInfo.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A number which can be used to hash this instance. |
GetResolvedColor()
Gets the actual color which will be seen in Microsoft Excel if the WorkbookColorInfo is used.
Declaration
public Color GetResolvedColor()
Returns
Type | Description |
---|---|
Color |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The ThemeColorType is not null. When the ThemeColorType is set, the GetResolvedColor(Workbook) method must be called with a non-null Workbook. |
GetResolvedColor(Workbook)
Gets the actual color which will be seen in Microsoft Excel if the WorkbookColorInfo is used.
Declaration
public Color GetResolvedColor(Workbook workbook)
Parameters
Type | Name | Description |
---|---|---|
Workbook | workbook | The workbook in which the WorkbookColorInfo is used. |
Returns
Type | Description |
---|---|
Color | A Color which combines the Color, ThemeColorType, and/or Tint, depending on what is set. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
ToString()
Gets the string representation of the WorkbookColorInfo.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Operators
Equality(WorkbookColorInfo, WorkbookColorInfo)
Determines whether two WorkbookColorInfo instances are equal.
Declaration
public static bool operator ==(WorkbookColorInfo a, WorkbookColorInfo b)
Parameters
Type | Name | Description |
---|---|---|
WorkbookColorInfo | a | The first WorkbookColorInfo instance. |
WorkbookColorInfo | b | The second WorkbookColorInfo instance. |
Returns
Type | Description |
---|---|
System.Boolean | True if the WorkbookColorInfo instances are equal; False otherwise. |
Implicit(Color to WorkbookColorInfo)
Converts from a Color to a WorkbookColorInfo.
Declaration
public static implicit operator WorkbookColorInfo(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The color to use in the WorkbookColorInfo. |
Returns
Type | Description |
---|---|
WorkbookColorInfo | The WorkbookColorInfo containing the specified color. |
Implicit(WorkbookThemeColorType to WorkbookColorInfo)
Converts from a ThemeColorType to a WorkbookColorInfo.
Declaration
public static implicit operator WorkbookColorInfo(WorkbookThemeColorType themeColorType)
Parameters
Type | Name | Description |
---|---|---|
WorkbookThemeColorType | themeColorType | The theme color type to use in the WorkbookColorInfo. |
Returns
Type | Description |
---|---|
WorkbookColorInfo | The WorkbookColorInfo containing the specified theme color type. |
Inequality(WorkbookColorInfo, WorkbookColorInfo)
Determines whether two WorkbookColorInfo instances are unequal.
Declaration
public static bool operator !=(WorkbookColorInfo a, WorkbookColorInfo b)
Parameters
Type | Name | Description |
---|---|---|
WorkbookColorInfo | a | The first WorkbookColorInfo instance. |
WorkbookColorInfo | b | The second WorkbookColorInfo instance. |
Returns
Type | Description |
---|---|
System.Boolean | True if the WorkbookColorInfo instances are unequal; False otherwise. |