Class ForeColorSortCondition
Sort condition that orders rows or columns by cell text foreground color, placing cells with a specified color first or last.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Model.Sorting
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public sealed class ForeColorSortCondition : OrderedSortConditionBase<ThemableColor>, ISortCondition, ITranslatable, ICopyable<ISortCondition>, IWorksheetSortCondition
Constructors
ForeColorSortCondition(Int32, ThemableColor, SortOrder)
Initializes a new sort condition that orders by cell text foreground color, targeting a specific color.
Declaration
public ForeColorSortCondition(int relativeIndex, ThemableColor color, SortOrder sortOrder)
Parameters
|
System.Int32
relativeIndex
Gets the index of the row or column that is key for sorting relative to the sorted range. |
|
ThemableColor
color
The color. |
|
SortOrder
sortOrder
The sort order. |
Properties
Color
Gets the target text foreground color used to identify cells during sorting.
Declaration
public ThemableColor Color { get; }
Property Value
|
ThemableColor
The color. |
Comparer
Gets the comparer that determines sort order by matching cell text foreground colors against the target color.
Declaration
public override IComparer<SortValue> Comparer { get; }
Property Value
|
System.Collections.Generic.IComparer<SortValue>
The comparer used for sorting. |
Overrides
PropertyDefinition
Gets the cell property definition that identifies the text foreground color used for sorting.
Declaration
protected override IPropertyDefinition<ThemableColor> PropertyDefinition { get; }
Property Value
|
IPropertyDefinition<ThemableColor>
The property definition of the property which is used for sorting. |
Overrides
Methods
Equals(Object)
Determines whether the specified sort condition has the same color, relative index, and sort order.
Declaration
public override bool Equals(object obj)
Parameters
|
System.Object
obj
The object to compare with the current object. |
Returns
|
System.Boolean
true if the specified System.Object is equal to the current System.Object; otherwise, false. |
Overrides
GetHashCode()
Computes a hash code combining the target color and base sort condition properties.
Declaration
public override int GetHashCode()
Returns
|
System.Int32
A hash code for the current System.Object. |
Overrides
GetValue(Cells, Int32, Int32)
Gets the resolved text foreground color from the specified cell, with theme colors expanded to their local RGB values.
Declaration
public override object GetValue(Cells cells, int rowIndex, int columnIndex)
Parameters
|
Cells
cells
The cells. |
|
System.Int32
rowIndex
The row index. |
|
System.Int32
columnIndex
The column index. |
Returns
|
System.Object
The value of the specified cell. |