Back to Devexpress

XYDiagramPaneBase.BackColor Property

corelibraries-devexpress-dot-xtracharts-dot-xydiagrampanebase-f9c81656.md

latest4.0 KB
Original Source

XYDiagramPaneBase.BackColor Property

Gets or sets the pane’s background color.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Appearance)]
public Color BackColor { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Appearance)>
Public Property BackColor As Color

Property Value

TypeDescription
Color

A Color value which specifies the pane’s background color.

|

Remarks

The following image demonstrates how the BackColor property works.

For more information, refer to Panes.

Example

This example demonstrates the possibilities of customizing a chart diagram‘s panes‘ appearance at runtime.

csharp
XYDiagramPane myPane = new XYDiagramPane("The Pane's Name");

myPane.BackColor = Color.Aqua;
myPane.FillStyle.FillMode = FillMode.Empty;

myPane.BorderVisible = true;
myPane.BorderColor = Color.Blue;

myPane.Shadow.Visible = true;
myPane.Shadow.Color = Color.LightGray;
myPane.Shadow.Size = 2;
vb
Dim myPane As New XYDiagramPane("The Pane's Name")

myPane.BackColor = Color.Aqua
myPane.FillStyle.FillMode = FillMode.Empty

myPane.BorderVisible = True
myPane.BorderColor = Color.Blue

myPane.Shadow.Visible = True
myPane.Shadow.Color = Color.LightGray
myPane.Shadow.Size = 2

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-dashboard-access-api-of-underlying-controls/CS/Dashboard_ControlAccess/Form1.cs#L36

csharp
ChartControl chartControl = e.ChartControl;
    ((XYDiagram)chartControl.Diagram).Panes[0].BackColor = Color.Orange;
}

winforms-dashboard-access-api-of-underlying-controls/VB/Dashboard_ControlAccess/Form1.vb#L37

vb
Dim chartControl As ChartControl = e.ChartControl
    CType(chartControl.Diagram, XYDiagram).Panes(0).BackColor = Color.Orange
End If

See Also

BackImage

FillStyle

Panes

XYDiagramPaneBase Class

XYDiagramPaneBase Members

DevExpress.XtraCharts Namespace