Class
ColorPaletteBase

ColorPaletteBase is the base class for all palettes. When you want to implement custom Palette just inherit this class and implement the methods.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
public abstract class ColorPaletteBase

Inheritance: objectColorPaletteBase

Derived Classes: DefaultPaletteGrayscalePaletteReallyWebSafePaletteStandardPaletteWeb216PaletteOfficeColorPalette

Constructors

ColorPaletteBase()

Declaration

cs-api-definition
protected ColorPaletteBase()

Properties

ColumnsCount

Represent the number of columns in a Palette. If you want the colors in a Palette to be in a particular order use this property.

Declaration

cs-api-definition
public abstract int ColumnsCount { get; set; }

Property Value

int

The columns count.

ItemsFlow

Gets or sets the items flow direction.

Declaration

cs-api-definition
public abstract Orientation ItemsFlow { get; set; }

Property Value

Orientation

The items flow.

Methods

GetColors()

GetColors represent all the colors in a particular Palette. Implement this method in the inherit class.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public abstract IEnumerable<Color> GetColors()

Returns

IEnumerable<Color>

HexStringToColor(string)

This method convert string representation of a color to Color object.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public static Color HexStringToColor(string hexColor)

Parameters

hexColor

string

Color representation in HEX format.

Returns

Color

Remarks

This method convert string in #XXXXXXXX format to Color object.