RadTrackBarElement
Represents a trackbar element. RadTrackBarElement can be nested in other telerik controls. Essentially, the RadTrackBar is a simple wrapper for the RadTrackBarElement. The former transfers events to and from its corresponding RadTrackBarElement instance.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTrackBarElement : StackLayoutElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementStackLayoutElementRadTrackBarElement...
Implements:
Inherited Members
Constructors
public RadTrackBarElement()
Fields
Identifies the IsVertical dependency property.
public static RadProperty IsVerticalProperty
Occurs when a range value is changed.
public RangeChangedEventHandler RangeValueChanged
Properties
Gets or sets whether the selected thumb should move on arrow key press.
[Browsable(true)]
public bool AllowKeyNavigation { get; set; }
Gets or sets whether the element automatically adjusts its size to fit its content.
public override bool AutoSize { get; set; }
Overrides:
Gets the instance of TrackBarBodyElement. This element is the core component in the hierarchy tree and encapsulates the scale and indicators functionality.
[Browsable(false)]
public TrackBarBodyElement BodyElement { get; }
Gets or sets the currently selected thumb element.
[Browsable(false)]
public TrackBarThumbElement CurrentThumb { get; set; }
Gets or sets the track bar's orientation. When true, the track bar is displayed vertically.
[Browsable(false)]
public bool IsVertical { get; set; }
Gets or sets the style of labels displayed on the track bar.
public TrackBarLabelStyle LabelStyle { get; set; }
Gets or sets the number of positions that the track bar moves in response to mouse clicks. A value of zero uses the default large change calculation.
public int LargeChange { get; set; }
Gets or sets the number of positions between large tick marks on the track bar. A value of zero disables large tick marks.
public int LargeTickFrequency { get; set; }
Gets the instance of the left TrackBarArrowButton used for navigation.
[Browsable(false)]
public TrackBarArrowButton LeftButton { get; }
Gets or sets the maximum value for the track bar position. The value cannot be less than the minimum value.
public float Maximum { get; set; }
Gets or sets the minimum value for the track bar position. The value cannot be less than zero.
public float Minimum { get; set; }
Gets the collection of ranges defined for the track bar.
public TrackBarRangeCollection Ranges { get; }
Gets the instance of the right TrackBarArrowButton used for navigation.
[Browsable(false)]
public TrackBarArrowButton RightButton { get; }
Gets or sets whether the track bar navigation buttons should be displayed.
public bool ShowButtons { get; set; }
Gets or sets whether the slide area should be visible on the track bar.
public bool ShowSlideArea { get; set; }
Gets or sets the visibility of tick marks on the track bar.
public bool ShowTicks { get; set; }
[Browsable(false)]
public int SlideAreaWidth { get; set; }
[Browsable(false)]
public Color SliderAreaColor1 { get; set; }
[Browsable(false)]
public Color SliderAreaColor2 { get; set; }
[Browsable(false)]
public float SliderAreaGradientAngle { get; set; }
Gets or sets the number of positions that the track bar moves in response to keyboard arrow keys and the track bar buttons.
public int SmallChange { get; set; }
Gets or sets the number of positions between small tick marks on the track bar. A value of zero disables small tick marks.
public int SmallTickFrequency { get; set; }
Gets or sets the snap frequency behavior of the track bar.
public TrackBarSnapFrequency SnapFrequency { get; set; }
Gets or sets the snap mode behavior of the track bar.
public TrackBarSnapModes SnapMode { get; set; }
[Browsable(false)]
public int ThumbWidth { get; set; }
[Browsable(false)]
public int TickFrequency { get; set; }
Gets or sets whether the track bar's tick marks should be displayed and their style.
public TickStyles TickStyle { get; set; }
Gets or sets the mode of the track bar which determines how ranges and thumbs behave.
public TrackBarRangeMode TrackBarMode { get; set; }
Methods
Creates the child elements that comprise the RadTrackBarElement.
protected override void CreateChildElements()
Overrides:
Creates the main body element that contains the track bar scales and indicators.
protected virtual TrackBarBodyElement CreateTrackBarBodyElement()
A new instance of TrackBarBodyElement.
Creates the left arrow button element for the track bar.
protected virtual TrackBarArrowButton CreateTrackBarLeftArrowButton()
A new instance of TrackBarArrowButton.
Creates the right arrow button element for the track bar.
protected virtual TrackBarArrowButton CreateTrackBarRightArrowButton()
A new instance of TrackBarArrowButton.
Called when the DPI scale changes and resets cached size measurements.
public override void DpiScaleChanged(SizeF scaleFactor)
The scaling factor applied.
Overrides:
Fires the Scroll event with the specified old value.
public void FireScrollEvent(int oldValue)
The previous value before the change.
Initializes the default values for the element's fields.
protected override void InitializeFields()
Overrides:
Handles keyboard input for track bar navigation when AllowKeyNavigation is enabled.
protected override void OnKeyDown(KeyEventArgs e)
The key event arguments.
Overrides:
Raises the LabelFormatting event.
protected virtual void OnLabelFormatting(TrackBarLabelElement labelElement)
The label element to be formatted.
Called when the element is loaded and initializes formatting for labels and tick marks.
protected override void OnLoaded()
Overrides:
Called when a property change notification is triggered and handles layout and visual updates.
protected override void OnNotifyPropertyChanged(string propertyName)
The name of the property that changed.
Overrides:
Called when a property value changes and handles property-specific updates.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property changed event arguments.
Overrides:
Raises the RangeValueChanged event.
protected void OnRangeValueChanged(RangeChangedEventArgs e)
The event arguments containing the changed range information.
Raises the Scroll event.
public virtual void OnScroll(ScrollEventArgs e)
The scroll event arguments.
Raises the TickFormatting event.
protected virtual void OnTickFormatting(TrackBarTickElement tickElement)
The tick element to be formatted.
Raises the ValueChanged event.
Events
Occurs when a label needs to be formatted.
public event LabelFormattingEventHandler LabelFormatting
Occurs when the track bar slider moves.
public event ScrollEventHandler Scroll
Occurs when a tick mark needs to be formatted.
public event TickFormattingEventHandler TickFormatting
Occurs when the Value property changes.
public event EventHandler ValueChanged