Back to Devexpress

ScrollBarOptions.BarColor Property

corelibraries-devexpress-dot-xtracharts-dot-scrollbaroptions-0a8415d4.md

latest4.0 KB
Original Source

ScrollBarOptions.BarColor Property

Gets or sets the bar’s color in a scroll bar.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

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

Property Value

TypeDescription
Color

A Color value which represents the bar’s color in a scroll bar.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to BarColor
XYDiagramPaneBase

.ScrollBarOptions .BarColor

|

Remarks

A Scroll bar’s appearance is determined by its ScrollBarOptions.BackColor, BarColor , ScrollBarOptions.BorderColor and ScrollBarOptions.BarThickness properties.

Note

If the BarColor property is set to Empty, the bar color is obtained from the appearance settings (a chart’s appearance is specified via its ChartControl.AppearanceName property).

The following images demonstrate the BarColor property in action.

|

BarColor isn’t defined

(the default value)

|

BarColor = Color.Blue

| | --- | --- | |

|

|

For more information on customizing the scroll bars, refer to Panes.

Example

This example demonstrates how the appearance of a pane‘s scroll bar can be customized.

Note that for a pane, it’s possible to individually adjust the position and visibility of its X and Y-axis’ scroll bars.

csharp
ScrollBarOptions scrollBarOptions = diagram.DefaultPane.ScrollBarOptions;

scrollBarOptions.BackColor = Color.White;
scrollBarOptions.BarColor = Color.Blue;
scrollBarOptions.BorderColor = Color.Navy;
scrollBarOptions.BarThickness = 15;
scrollBarOptions.XAxisScrollBarAlignment = ScrollBarAlignment.Far;
scrollBarOptions.XAxisScrollBarVisible = true;
vb
Dim scrollBarOptions As ScrollBarOptions = diagram.DefaultPane.ScrollBarOptions

scrollBarOptions.BackColor = Color.White
scrollBarOptions.BarColor = Color.Blue
scrollBarOptions.BorderColor = Color.Navy
scrollBarOptions.BarThickness = 15
scrollBarOptions.XAxisScrollBarAlignment = ScrollBarAlignment.Far
scrollBarOptions.XAxisScrollBarVisible = True

See Also

BackColor

BarThickness

BorderColor

Panes

ScrollBarOptions Class

ScrollBarOptions Members

DevExpress.XtraCharts Namespace