Back to Devexpress

ScrollBarOptions.BarThickness Property

corelibraries-devexpress-dot-xtracharts-dot-scrollbaroptions-239a115d.md

latest3.6 KB
Original Source

ScrollBarOptions.BarThickness Property

Gets or sets the thickness of scroll bars.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public int BarThickness { get; set; }
vb
Public Property BarThickness As Integer

Property Value

TypeDescription
Int32

An integer value which specifies the scroll bars’ thickness, in pixels. This value can’t be less than 3 , or greater than 25.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to BarThickness
XYDiagramPaneBase

.ScrollBarOptions .BarThickness

|

Remarks

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

The following images demonstrate the BarThickness property in action.

BarThickness = 5BarThickness = 15

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

BarColor

BorderColor

Panes

ScrollBarOptions Class

ScrollBarOptions Members

DevExpress.XtraCharts Namespace