Class
FillColorSortCondition

Sort condition that orders cells by their background fill color, grouping matching fills together.

Definition

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

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public sealed class FillColorSortCondition : OrderedSortConditionBase<IFill>, ISortCondition

Inheritance: objectSortConditionBase<IFill>OrderedSortConditionBase<IFill>FillColorSortCondition

Implements: ISortCondition

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

Constructors

FillColorSortCondition(int, IFill, SortOrder)

Initializes a new instance of the FillColorSortCondition class with a target fill color for sorting.

Declaration

cs-api-definition
public FillColorSortCondition(int relativeIndex, IFill fill, SortOrder sortOrder)

Parameters

relativeIndex

int

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

fill

IFill

The fill.

sortOrder

SortOrder

The sort order.

Properties

Comparer

Gets the comparer that prioritizes cells matching the target fill color.

Declaration

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

Property Value

IComparer<SortValue>

The comparer used for sorting.

Overrides SortConditionBase<IFill>.Comparer

Fill

Gets the target fill color used to identify matching cells for priority sorting.

Declaration

cs-api-definition
public IFill Fill { get; }

Property Value

IFill

The fill.

PropertyDefinition

Gets the cell fill property definition used for color comparison.

Declaration

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

Property Value

IPropertyDefinition<IFill>

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

Overrides SortConditionBase<IFill>.PropertyDefinition

Methods

Equals(object)

Determines whether the specified object is a FillColorSortCondition with the same fill color and settings.

Declaration

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

Parameters

obj

object

The obj.

Returns

bool

Overrides OrderedSortConditionBase<IFill>.Equals(object)

GetHashCode()

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

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

Overrides OrderedSortConditionBase<IFill>.GetHashCode()

GetValue(Cells, int, int)

Extracts the fill color from the specified cell, resolving theme colors to 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<IFill>.GetValue(Cells, int, int)