Edit this page


TrackBarPrimitive provides the basic visual layout of a trackbar background. Typically you would use a higher level object, i.e. the RadTrackBarElement to include in your control. RadTrackBarElement handles the position of the track bar thumb and the various events that go into making the track bar useful.

tpf-primitives-trackbarprimitive 001

Creating a TrackBarPrimitive

public class MyTrackBarPrimitiveElement : RadElement
    protected override void CreateChildElements()
        TrackBarPrimitive trackBarPrimitive = new TrackBarPrimitive();
        trackBarPrimitive.ForeColor = Color.Blue;
        trackBarPrimitive.BackColor = Color.SkyBlue;
        trackBarPrimitive.TickColor = Color.Green;
        trackBarPrimitive.ThumbWidth = 5;
        trackBarPrimitive.ShowSlideArea = true;
        trackBarPrimitive.TickStyle = Telerik.WinControls.Enumerations.TickStyles.Both;
        trackBarPrimitive.TrackBarOrientation = Orientation.Horizontal;

Public Class MyTrackBarPrimitiveElement
    Inherits RadElement
    Protected Overrides Sub CreateChildElements()
        Dim trackBarPrimitive As New TrackBarPrimitive()
        trackBarPrimitive.ForeColor = Color.Blue
        trackBarPrimitive.BackColor = Color.SkyBlue
        trackBarPrimitive.TickColor = Color.Green
        trackBarPrimitive.ThumbWidth = 5
        trackBarPrimitive.ShowSlideArea = True
        trackBarPrimitive.TickStyle = Telerik.WinControls.Enumerations.TickStyles.Both
        trackBarPrimitive.TrackBarOrientation = Orientation.Horizontal
    End Sub
End Class

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article