New to Telerik UI for WinForms? Download free 30-day trial

RadTrackBarElement

RadTrackBarElement contains the logic and user interface for RadTrackBar.

tpf-elements-radtrackbar 001

public class MyTrackBarControl : RadControl
{
    protected override void CreateChildItems(RadElement parent)
    {
        RadTrackBarElement radTrackBarElement = new RadTrackBarElement();
        radTrackBarElement.ShowTicks = true;
        radTrackBarElement.Minimum = 1;
        radTrackBarElement.Maximum = 100;
        radTrackBarElement.TickFrequency = 10;
        radTrackBarElement.Value = 20;
        this.RootElement.Children.Add(radTrackBarElement);
        base.CreateChildItems(parent);
    }
}

Public Class MyTrackBarControl
    Inherits RadControl
    Protected Overrides Sub CreateChildItems(ByVal parent As RadElement)
        Dim radTrackBarElement As New RadTrackBarElement()
        radTrackBarElement.ShowTicks = True
        radTrackBarElement.Minimum = 1
        radTrackBarElement.Maximum = 100
        radTrackBarElement.TickFrequency = 10
        radTrackBarElement.Value = 20
        Me.RootElement.Children.Add(radTrackBarElement)
        MyBase.CreateChildItems(parent)
    End Sub
End Class

See Also

In this article