In Ultimate UI for Windows Forms 2006 Volume 2, you can now style the scrollbars in WinTree™ just like you would with WinScrollBar™. We added a ScrollBarLook property to the WinTree 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 WinTree’s scrollbars.
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 WinTree's scrollbar Me.UltraTree1.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 WinTree's scrollbar this.ultraTree1.ScrollBarLook.Appearance = app1;