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.
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
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:
trueif shade generation is enabled; otherwise,false.
Kind
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 | The event data. |
Events
Changed
Occurs after the palette has been changed.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()