Back to Devexpress

DrawOptions.Color Property

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

latest3.2 KB
Original Source

DrawOptions.Color Property

Gets or sets the series or series point color when implementing custom drawing in the chart control.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public Color Color { get; set; }
vb
Public Property Color As Color

Property Value

TypeDescription
Color

A Color value representing the color used for custom drawing series or series points.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to Color
CustomDrawSeriesEventArgs

.DrawOptions .Color

|

Remarks

Use the Color property to access and modify the color in the ChartControl.CustomDrawSeries or ChartControl.CustomDrawSeriesPoint event handler.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Color property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-charts-custom-draw-chart-series-points/CS/CustomDrawChart/MainWindow.xaml.cs#L44

csharp
{
    drawOptions.Color = Color.FromArgb(0xFF, 0x51, 0x89, 0x03);
    return "Green";

wpf-charts-custom-draw-chart-series-points/VB/CustomDrawChart/MainWindow.xaml.vb#L32

vb
If val < 1 Then
    drawOptions.Color = Color.FromArgb(&HFF, &H51, &H89, &H03)
    Return "Green"

See Also

CustomDrawSeries

CustomDrawSeriesPoint

DrawOptions Class

DrawOptions Members

DevExpress.Xpf.Charts Namespace