$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
WinForms Track and Status Control
Easily customizing Track and Status controls and build interactive and attractive UI
Home > WinForms UI Controls > User Manual > Track Bar Modes in C#

TrackBar Modes for Windows Forms in C#.NET

KetticTrackBar control for WinForms provides a horizontal bar and a vertical bar with a sliding handle that can be moved by using the mouse and a series of marks. It is capable of customizing the slider and assigning a value on a bar by moving a slider. In addition, the KetticTrackBar control includes three different modes, SingleThumb, StartFromTheBeginning and Range, for the developers to define the various functionalities and behaviors for the track bar. The TrackBarMode property is able to change the mode for the control. The following C# tutorial shows how to customize the modes for KetticTrackBar.

KetticTrackBar SingleThumb Mode for Windows Forms

The SingleThumb mode of the KetticTrackBar provides the standard functionalities and behaviors of TrackBar. This mode includes a single thumb and we can access the value of the thumb via the Value property. The ValueChanged event of the KetticTrackBar control is able to receive the notification.

KetticTrackBar StartFromTheBeginning Mode for Windows Forms

This mode has the same appearance of the SingleThumb mode, but contains more than one thumb. The thumbs can be displayed via adding the desired Ranges into the Ranges collection in the KetticTrackBar control. The C# code below demonstrates how to achieve this.

this.ketticTrackBar1.TrackBarMode = Kettic.WinForms.UI.TrackBarRangeMode.StartFromTheBeginning;
this.ketticTrackBar1.Ranges.Add(new TrackBarRange(0, 5, "MyRange1"));
this.ketticTrackBar1.Ranges.Add(new TrackBarRange(0, 15, "MyRange2"));
In the StartFromTheBeginning mode, we can access the thumbs value via the Ranges collection, as well as check the TrackBarRange values. And this mode only uses the End property of TrackBarRange. The C# code below shows how to access the value.

this.ketticTrackBar1.TrackBarMode = float fitstRangeValue = this.ketticTrackBar1.Ranges[0].End;
float secondRangeValue = this.ketticTrackBar1.Ranges[1].End;
The Ranges collection contains the CollectionChanged event to receive the notification when the Value is changed. The C# code below demonstrates how to do this.

KetticTrackBar Range Mode for Windows Forms

The Range mode of the KetticTrackBar control is used to define the Start and End values to the Ranges. When we need to add more than one Range, we should add the TrackBarRange into the Ranges collection as the C# code sample below.

this.ketticTrackBar1.TrackBarMode = Kettic.WinForms.UI.TrackBarRangeMode.Range;
this.ketticTrackBar1.Ranges[0].Start = 2;
this.ketticTrackBar1.Ranges[0].End = 5;
this.ketticTrackBar1.Ranges.Add(new TrackBarRange(10, 15));
The Range mode provides the CollectionChanged event in the Ranges collection to receive the notification when the Value is changed. The C# code below shows how to customize this mode.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls