Back to Devexpress

CustomPalette.Colors Property

wpf-devexpress-dot-xpf-dot-charts-dot-custompalette.md

latest2.0 KB
Original Source

CustomPalette.Colors Property

Gets the colors of the custom palette.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public ColorCollection Colors { get; }
vb
Public ReadOnly Property Colors As ColorCollection

Property Value

TypeDescription
ColorCollection

A ColorCollection object that represents the palette’s collection of colors.

|

Remarks

Make sure that you do not specify this property and ColorItemsSource simultaneously. The Chart Control throws an exception if you do this.

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>

See Also

CustomPalette Class

CustomPalette Members

DevExpress.Xpf.Charts Namespace