Version

Style the Scrollbars of WinListView

In Ultimate UI for Windows Forms 2006 Volume 2, you can style the scrollbars in WinListView™ as you would with WinScrollBar™. We added a ScrollBarLook property to the WinListView that exposes several of the same objects as the WinScrollBar control. By setting the Appearance property of the ScrollBarLook property to an Appearance object, you can style the entire scrollbar. Alternatively, if you need more control, you can set properties such as ButtonAppearance , ThumbAppearance , and TrackAppearance .

The following code will create an Appearance object, set a few of its properties to show a light blue vertical gradient, and than apply that appearance to the WinListView’s scrollbars.

styling the scrollbar of ultralistview

In Visual Basic:

Imports Infragistics.Win
...
' Create an appearance object
Dim app1 As New Infragistics.Win.Appearance()
' Set the properties of the first appearance object
app1.BackColor = Color.White
app1.BackColor2 = Color.LightBlue
app1.BackGradientStyle = GradientStyle.Vertical
app1.ThemedElementAlpha = Alpha.Transparent
' Set the appearance of the WinListView's scrollbar
Me.UltraListView1.ScrollBarLook.Appearance = app1

In C#:

using Infragistics.Win;
...
// Create an appearance object
Infragistics.Win.Appearance app1 = new Infragistics.Win.Appearance();
// Set the properties of the first appearance object
app1.BackColor = Color.White;
app1.BackColor2 = Color.LightBlue;
app1.BackGradientStyle = GradientStyle.Vertical;
app1.ThemedElementAlpha = Alpha.Transparent;
// Set the appearance of the WinListView's scrollbar
this.ultraListView1.ScrollBarLook.Appearance = app1;