In This Article

Palette Class

Provides a palette of colors for use in charts.

[TypeConverter(typeof(PaletteConverter))]
public class Palette
Inheritance:
object object

Constructors

Palette()

Initializes an instance of the class.

public Palette()

Palette(PaletteKind)

Initializes an instance of the class.

public Palette(PaletteKind kind)
Parameter Type Description
kind PaletteKind

A PaletteKind that indicates the built-in palette to use.

Palette(params Color[]?)

Initializes an instance of the class.

public Palette(params Color[]? paletteBaseColors)
Parameter Type Description
paletteBaseColors Color[]

The palette Color values.

Properties

BaseColors

The collection of palette base Color objects used to generate the palette.

public ObservableCollection<Color> BaseColors { get; }

Property Value

ObservableCollection<Color>

ColorSelectionHint

A ColorSelectionHint that provides a hint on how to perform color selection for this palette.

public ColorSelectionHint ColorSelectionHint { get; set; }

Property Value

ColorSelectionHint:

The default value is UniformDistribution.

Remarks

See the documentation on the ColorSelectionHint for more information on usage.

Colors

The read-only collection of Color objects in this palette.

public ReadOnlyObservableCollection<Color> Colors { get; }

Property Value

ReadOnlyObservableCollection<Color>

Remarks

This collection includes the BaseColors values, along with other shade variants if the IsShadeGenerationEnabled property is set to true.

See Also

IsShadeGenerationEnabled

Indicates whether dark and light shade variants of the BaseColors will be appended to the Colors collection.

public bool IsShadeGenerationEnabled { get; set; }

Property Value

bool:

true if shade generation is enabled; otherwise, false.

Kind

A PaletteKind that indicates the built-in palette to use.

public PaletteKind Kind { get; set; }

Property Value

PaletteKind

Methods

OnChanged(EventArgs)

Raises the Changed event.

protected virtual void OnChanged(EventArgs e)
Parameter Type Description
e EventArgs

The event data.

Events

Changed

Occurs after the palette has been changed.

public event EventHandler? Changed

Event Type

EventHandler

Inherited Members

Extension Methods