New to Telerik UI for WinForms? Start a free 30-day trial

Compares best-fit width entries by either their measured width or stored count.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class WidthCountPairComparer

Inheritance: objectWidthCountPairComparer

Constructors

Initializes a comparer that selects width comparison when compareWidth is true, or count comparison otherwise.

C#
public WidthCountPairComparer(bool compareWidth)
Parameters:compareWidthbool

Whether to compare Width instead of Count.

Properties

Gets or sets whether comparisons use width rather than the stored count.

C#
public bool CompareWidth { get; set; }

Methods

Compares only the selected metric; entries with the same metric compare equal even if their other value differs.

C#
public int Compare(WidthCountPair x, WidthCountPair y)
Parameters:xWidthCountPair

The first width/count entry.

yWidthCountPair

The second width/count entry.

Returns:

int

A negative value, zero, or a positive value according to the selected metric's comparison.