ClassRadTrackBarElement
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
RadTrackBarElement()
Declaration
public RadTrackBarElement()
Fields
IsVerticalProperty
Identifies the IsVertical dependency property.
RangeValueChanged
Occurs when a range value is changed.
Declaration
public RangeChangedEventHandler RangeValueChanged
Field Value
Properties
AllowKeyNavigation
Gets or sets whether the selected thumb should move on arrow key press.
Declaration
[Browsable(true)]
public bool AllowKeyNavigation { get; set; }
Property Value
AutoSize
Gets or sets whether the element automatically adjusts its size to fit its content.
Declaration
public override bool AutoSize { get; set; }
Property Value
Overrides
BodyElement
Gets the instance of TrackBarBodyElement. This element is the core component in the hierarchy tree and encapsulates the scale and indicators functionality.
Declaration
[Browsable(false)]
public TrackBarBodyElement BodyElement { get; }
Property Value
CurrentThumb
Gets or sets the currently selected thumb element.
Declaration
[Browsable(false)]
public TrackBarThumbElement CurrentThumb { get; set; }
Property Value
IsVertical
Gets or sets the track bar's orientation. When true, the track bar is displayed vertically.
Declaration
[Browsable(false)]
public bool IsVertical { get; set; }
Property Value
LabelStyle
Gets or sets the style of labels displayed on the track bar.
Declaration
public TrackBarLabelStyle LabelStyle { get; set; }
Property Value
LargeChange
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.
LargeTickFrequency
Gets or sets the number of positions between large tick marks on the track bar. A value of zero disables large tick marks.
LeftButton
Gets the instance of the left TrackBarArrowButton used for navigation.
Declaration
[Browsable(false)]
public TrackBarArrowButton LeftButton { get; }
Property Value
Maximum
Gets or sets the maximum value for the track bar position. The value cannot be less than the minimum value.
Minimum
Gets or sets the minimum value for the track bar position. The value cannot be less than zero.
Ranges
Gets the collection of ranges defined for the track bar.
Declaration
public TrackBarRangeCollection Ranges { get; }
Property Value
RightButton
Gets the instance of the right TrackBarArrowButton used for navigation.
Declaration
[Browsable(false)]
public TrackBarArrowButton RightButton { get; }
Property Value
ShowButtons
Gets or sets whether the track bar navigation buttons should be displayed.
ShowSlideArea
Gets or sets whether the slide area should be visible on the track bar.
ShowTicks
Gets or sets the visibility of tick marks on the track bar.
SlideAreaWidth
Declaration
[Browsable(false)]
public int SlideAreaWidth { get; set; }
Property Value
SliderAreaColor1
Declaration
[Browsable(false)]
public Color SliderAreaColor1 { get; set; }
Property Value
SliderAreaColor2
Declaration
[Browsable(false)]
public Color SliderAreaColor2 { get; set; }
Property Value
SliderAreaGradientAngle
Declaration
[Browsable(false)]
public float SliderAreaGradientAngle { get; set; }
Property Value
SmallChange
Gets or sets the number of positions that the track bar moves in response to keyboard arrow keys and the track bar buttons.
SmallTickFrequency
Gets or sets the number of positions between small tick marks on the track bar. A value of zero disables small tick marks.
SnapFrequency
Gets or sets the snap frequency behavior of the track bar.
Declaration
public TrackBarSnapFrequency SnapFrequency { get; set; }
Property Value
SnapMode
Gets or sets the snap mode behavior of the track bar.
Declaration
public TrackBarSnapModes SnapMode { get; set; }
Property Value
ThumbSize
Declaration
[Browsable(false)]
public Size ThumbSize { get; set; }
Property Value
ThumbWidth
Declaration
[Browsable(false)]
public int ThumbWidth { get; set; }
Property Value
TickColor
Declaration
[Browsable(false)]
public Color TickColor { get; set; }
Property Value
TickFrequency
Declaration
[Browsable(false)]
public int TickFrequency { get; set; }
Property Value
TickStyle
Gets or sets whether the track bar's tick marks should be displayed and their style.
TrackBarMode
Gets or sets the mode of the track bar which determines how ranges and thumbs behave.
Declaration
public TrackBarRangeMode TrackBarMode { get; set; }
Property Value
Methods
CreateChildElements()
Creates the child elements that comprise the RadTrackBarElement.
Declaration
protected override void CreateChildElements()
Overrides
CreateTrackBarBodyElement()
Creates the main body element that contains the track bar scales and indicators.
Declaration
protected virtual TrackBarBodyElement CreateTrackBarBodyElement()
Returns
A new instance of TrackBarBodyElement.
CreateTrackBarLeftArrowButton()
Creates the left arrow button element for the track bar.
Declaration
protected virtual TrackBarArrowButton CreateTrackBarLeftArrowButton()
Returns
A new instance of TrackBarArrowButton.
CreateTrackBarRightArrowButton()
Creates the right arrow button element for the track bar.
Declaration
protected virtual TrackBarArrowButton CreateTrackBarRightArrowButton()
Returns
A new instance of TrackBarArrowButton.
DpiScaleChanged(SizeF)
Called when the DPI scale changes and resets cached size measurements.
Declaration
public override void DpiScaleChanged(SizeF scaleFactor)
Parameters
scaleFactor
The scaling factor applied.
Overrides
FireScrollEvent(int)
Fires the Scroll event with the specified old value.
Declaration
public void FireScrollEvent(int oldValue)
Parameters
oldValue
The previous value before the change.
InitializeFields()
Initializes the default values for the element's fields.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the desired size of the element, taking into account cached measurements for performance.
OnKeyDown(KeyEventArgs)
Handles keyboard input for track bar navigation when AllowKeyNavigation is enabled.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
The key event arguments.
Overrides
OnLabelFormatting(TrackBarLabelElement)
Raises the LabelFormatting event.
Declaration
protected virtual void OnLabelFormatting(TrackBarLabelElement labelElement)
Parameters
labelElement
The label element to be formatted.
OnLoaded()
Called when the element is loaded and initializes formatting for labels and tick marks.
Declaration
protected override void OnLoaded()
Overrides
OnNotifyPropertyChanged(string)
Called when a property change notification is triggered and handles layout and visual updates.
Declaration
protected override void OnNotifyPropertyChanged(string propertyName)
Parameters
propertyName
The name of the property that changed.
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Called when a property value changes and handles property-specific updates.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
The property changed event arguments.
Overrides
OnRangeValueChanged(RangeChangedEventArgs)
Raises the RangeValueChanged event.
Declaration
protected void OnRangeValueChanged(RangeChangedEventArgs e)
Parameters
e
The event arguments containing the changed range information.
OnScroll(ScrollEventArgs)
Raises the Scroll event.
Declaration
public virtual void OnScroll(ScrollEventArgs e)
Parameters
e
The scroll event arguments.
OnTickFormatting(TrackBarTickElement)
Raises the TickFormatting event.
Declaration
protected virtual void OnTickFormatting(TrackBarTickElement tickElement)
Parameters
tickElement
The tick element to be formatted.
OnValueChanged(EventArgs)
Raises the ValueChanged event.
Declaration
public virtual void OnValueChanged(EventArgs e)
Parameters
e
The event arguments.
Events
LabelFormatting
Occurs when a label needs to be formatted.
Declaration
public event LabelFormattingEventHandler LabelFormatting
Event Value
Scroll
Occurs when the track bar slider moves.
TickFormatting
Occurs when a tick mark needs to be formatted.
Declaration
public event TickFormattingEventHandler TickFormatting
Event Value
ValueChanged
Occurs when the Value property changes.