Palette Class
Provides a palette of colors for use in charts.
public class Palette
- Inheritance:
- Object Object
Constructors
Palette()
Initializes a new instance of the Palette class.
public Palette()
Palette(PaletteKind)
Initializes a new instance of the Palette class.
public Palette(PaletteKind kind)
Parameter | Type | Description |
---|---|---|
kind | PaletteKind | A PaletteKind that indicates the built-in palette to use. |
Palette(Color[])
Initializes a new instance of the Palette class.
public Palette(params Color[] paletteBaseColors)
Parameter | Type | Description |
---|---|---|
paletteBaseColors | Color[] | The palette Color values. |
Properties
BaseColors
Gets the collection of palette base Color objects used to generate the palette.
public ObservableCollection<Color> BaseColors { get; }
Property Value
- ObservableCollection<Color>:
The collection of palette base Color objects used to generate the palette.
Colors
Gets the read-only collection of Color objects in this palette.
public ReadOnlyObservableCollection<Color> Colors { get; }
Property Value
- ReadOnlyObservableCollection<Color>:
The read-only collection of Color objects in this palette.
Remarks
This collection includes the BaseColors values, along with other shade variants if the IsShadeGenerationEnabled
property is set to true
.
See Also
ColorSelectionHint
Gets or sets a ColorSelectionHint that provides a hint on how to perform color selection for this palette.
public ColorSelectionHint ColorSelectionHint { get; set; }
Property Value
- ColorSelectionHint:
A ColorSelectionHint that provides a hint on how to perform color selection for this palette. The default hint is
UniformDistribution
.
Remarks
See the documentation on the ColorSelectionHint for more information on usage.
IsShadeGenerationEnabled
Gets or sets whether dark and light shade variants of the BaseColors will be appended to the Colors collection.
public bool IsShadeGenerationEnabled { get; set; }
Property Value
- Boolean:
true
if shade generation is enabled; otherwise,false
.
Kind
Gets or sets a PaletteKind that indicates the built-in palette to use.
public PaletteKind Kind { get; set; }
Property Value
- PaletteKind:
A PaletteKind that indicates the built-in palette to use.
Methods
OnChanged(EventArgs)
Raises the Changed
event.
protected virtual void OnChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
Events
Changed
Occurs after the palette has been changed.