New to Telerik UI for WPFStart a free 30-day trial

OfficeColorPalette is the base class for all MSOffice2007 palettes. All office palettes inherit this class and implement GetHeaderColors() and GetGeneratedColors() as well as GetColors() methods.

Definition

Constructors

C#
protected OfficeColorPalette()

Properties

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.

C#
public override int ColumnsCount { get; set; }
Property Value:

The columns count.

Overrides: ColorPaletteBase.ColumnsCount

ItemsFlow

Orientation

Gets or sets the items flow direction in a Palette..

C#
public override Orientation ItemsFlow { get; set; }
Property Value:

The items flow.

Overrides: ColorPaletteBase.ItemsFlow

Methods

GetColors represent all the colors in a particular Palette including header and main palette colors.

C#
public override IEnumerable<Color> GetColors()
Returns:

IEnumerable<Color>

Returns a collection of all colors: header and main.

Overrides: ColorPaletteBase.GetColors()

GetGeneratedColors is used when you want to get only the generated(the production from the base colors) colors for a specific Office palette.

C#
public abstract IEnumerable<Color> GetGeneratedColors()
Returns:

IEnumerable<Color>

Returns a collection of the generated colors.

Remarks:

This method returns the main palette colors and it is implemented in all classes that derive from OfficeColorPalette.

GetHeaderColors is used when you want to get only the base(header) colors for a specific Office palette.

C#
public abstract IEnumerable<Color> GetHeaderColors()
Returns:

IEnumerable<Color>

Returns a collection of the header colors.

Remarks:

This method returns the header colors and it is implemented in all classes that derive from OfficeColorPalette.

A helper to generate a MSOffice2007 like palette. This method generate a production of each color using its brightness and all generated colors form a Palette.

C#
public static IEnumerable<Color> GetPaletteFromBaseColors(IEnumerable<Color> baseColors)
Parameters:baseColorsIEnumerable<Color>

The base colors. This is a collection with colors that are used for generating the palette colors.

Returns:

IEnumerable<Color>