Class
OfficeColorPalette

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

OfficeColorPalette()

Declaration

cs-api-definition
protected OfficeColorPalette()

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 override int ColumnsCount { get; set; }

Property Value

int

The columns count.

Overrides ColorPaletteBase.ColumnsCount

ItemsFlow

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

Declaration

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

Property Value

Orientation

The items flow.

Overrides ColorPaletteBase.ItemsFlow

Methods

GetColors()

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

Declaration

cs-api-definition
public override IEnumerable<Color> GetColors()

Returns

IEnumerable<Color>

Returns a collection of all colors: header and main.

Overrides ColorPaletteBase.GetColors()

GetGeneratedColors()

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

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
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()

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

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
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.

GetPaletteFromBaseColors(IEnumerable<Color>)

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.

Declaration

cs-api-definition
public static IEnumerable<Color> GetPaletteFromBaseColors(IEnumerable<Color> baseColors)

Parameters

baseColors

IEnumerable<Color>

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

Returns

IEnumerable<Color>