New to Telerik UI for WinFormsStart a free 30-day trial

TrackBarPrimitive

Updated over 6 months ago

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

C#
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;
        this.Children.Add(trackBarPrimitive);
        base.CreateChildElements();
    }
}

See Also

In this article
See Also
Not finding the help you need?
Contact Support