Back to Devexpress

ColorCollection Class

wpf-devexpress-dot-xpf-dot-charts-33129b50.md

latest2.6 KB
Original Source

ColorCollection Class

Represents the collection of a CustomPalette‘s colors.

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class ColorCollection :
    ObservableCollection<Color>,
    IFormattable
vb
Public Class ColorCollection
    Inherits ObservableCollection(Of Color)
    Implements IFormattable

The following members return ColorCollection objects:

Remarks

An object of the ColorCollection type is returned by the CustomPalette.Colors property.

Example

This example demonstrates how to change the series point colors by using a custom palette. To do this, a CustomPalette is added to the chart’s ChartControlBase.Palette. And, custom colors are specified via the CustomPalette.Colors property.

View Example

xaml
<dxc:ChartControl.Palette>
    <dxc:CustomPalette>
        <dxc:CustomPalette.Colors>
            <Color>Blue</Color>
            <Color>Yellow</Color>
            <Color>Magenta</Color>
        </dxc:CustomPalette.Colors>
    </dxc:CustomPalette>
</dxc:ChartControl.Palette>

Inheritance

Object Collection<Color> ObservableCollection<Color> ColorCollection

See Also

ColorCollection Members

DevExpress.Xpf.Charts Namespace