Xceed Grid for WinForms v4.3 Documentation
WinVerticalScrollBar control

Welcome to Xceed Grid for WinForms v4.3 > Basic Concepts > Editor Controls > WinVerticalScrollBar control

The WinVerticalScrollBar class represents an extensible and themable vertical scrollbar for Windows Forms. It supports both Windows XP and classic Windows themes and can adapt to the current Windows theme. 

Background and foreground colors

When the scrollbar's UIStyle property is set to WindowsClassic, the BackColor and ForeColor properties can be set to change the background and foreground colors of the scrollbar. 

VB.NET Copy Code

' Set the scrollbar's UIStyle property to WindowsClassic
WinVerticalScrollBar1.UIStyle = Xceed.UI.UIStyle.WindowsClassic 

' Change the background and foreground colors
WinVerticalScrollBar1.BackColor = Color.CornflowerBlue
WinVerticalScrollBar1.ForeColor = Color.White

C# Copy Code

// Set the scrollbar's UIStyle property to WindowsClassic
winVerticalScrollBar1.UIStyle = Xceed.UI.UIStyle.WindowsClassic; 

// Change the background and foreground colors
winVerticalScrollBar1.BackColor = Color.CornflowerBlue;
winVerticalScrollBar1.ForeColor = Color.White;

The values of the BackColor and ForeColor properties are not taken into consideration when the UIStyle property is set to WindowsXP. If UIStyle is set to System, the colors assigned to the BackColor and ForeColor properties will only be applied to the scrollbar if the system is in Windows Classic style.