Back to Devexpress

ChartControl.BackColor Property

windowsforms-devexpress-dot-xtracharts-dot-chartcontrol-2975b4e1.md

latest3.6 KB
Original Source

ChartControl.BackColor Property

Gets or sets the chart control’s background color.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.UI.dll

NuGet Package : DevExpress.Win.Charts

Declaration

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

Property Value

TypeDescription
Color

A Color value which specifies the chart control’s background color.

|

Remarks

The BackColor property specifies the background color of the chart control.

Note that the chart control’s constituent elements such as a diagram or legend have their own background-related properties which when set override the corresponding properties of the chart control.

WhiteLavenderBlush

Example

csharp
using System.Drawing;
//...
chartControl1.BackColor = Color.LavenderBlush;
vb
Imports System.Drawing
'...
ChartControl1.BackColor = Color.LavenderBlush

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the BackColor 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.

winforms-charts-show-chart-legend-with-markers-in-separate-control/CS/Form1.cs#L28

csharp
fakeChart.Padding.All = 0;
fakeChart.BackColor = Color.Transparent;
fakeChart.Legend.Border.Visibility = DevExpress.Utils.DefaultBoolean.False;

winforms-charts-show-chart-legend-with-markers-in-separate-control/VB/Form1.vb#L27

vb
fakeChart.Padding.All = 0
fakeChart.BackColor = Color.Transparent
fakeChart.Legend.Border.Visibility = DevExpress.Utils.DefaultBoolean.False

See Also

BackImage

FillStyle

ChartControl Class

ChartControl Members

DevExpress.XtraCharts Namespace