Class
ForeColorSortCondition

Sort condition that orders rows or columns by cell text foreground color, placing cells with a specified color first or last.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Sorting

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public sealed class ForeColorSortCondition : OrderedSortConditionBase<ThemableColor>, ISortCondition

Inheritance: objectSortConditionBase<ThemableColor>OrderedSortConditionBase<ThemableColor>ForeColorSortCondition

Implements: ISortCondition

Inherited Members OrderedSortConditionBase<ThemableColor>.SortOrderSortConditionBase<ThemableColor>.RelativeIndex

Constructors

ForeColorSortCondition(int, ThemableColor, SortOrder)

Initializes a new sort condition that orders by cell text foreground color, targeting a specific color.

Declaration

cs-api-definition
public ForeColorSortCondition(int relativeIndex, ThemableColor color, SortOrder sortOrder)

Parameters

relativeIndex

int

Gets the index of the row or column that is key for sorting relative to the sorted range.

color

ThemableColor

The color.

sortOrder

SortOrder

The sort order.

Properties

Color

Gets the target text foreground color used to identify cells during sorting.

Declaration

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

cs-api-definition
public override IComparer<SortValue> Comparer { get; }

Property Value

IComparer<SortValue>

The comparer used for sorting.

Overrides SortConditionBase<ThemableColor>.Comparer

PropertyDefinition

Gets the cell property definition that identifies the text foreground color used for sorting.

Declaration

cs-api-definition
protected override IPropertyDefinition<ThemableColor> PropertyDefinition { get; }

Property Value

IPropertyDefinition<ThemableColor>

The property definition of the property which is used for sorting.

Overrides SortConditionBase<ThemableColor>.PropertyDefinition

Methods

Equals(object)

Determines whether the specified sort condition has the same color, relative index, and sort order.

Declaration

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

Parameters

obj

object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Overrides OrderedSortConditionBase<ThemableColor>.Equals(object)

GetHashCode()

Computes a hash code combining the target color and base sort condition properties.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides OrderedSortConditionBase<ThemableColor>.GetHashCode()

GetValue(Cells, int, int)

Gets the resolved text foreground color from the specified cell, with theme colors expanded to their local RGB values.

Declaration

cs-api-definition
public override object GetValue(Cells cells, int rowIndex, int columnIndex)

Parameters

cells

Cells

The cells.

rowIndex

int

The row index.

columnIndex

int

The column index.

Returns

object

The value of the specified cell.

Overrides SortConditionBase<ThemableColor>.GetValue(Cells, int, int)