Class 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.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadTrackBarElement : StackLayoutElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadTrackBarElement()
Declaration
public RadTrackBarElement()
Fields
IsVerticalProperty
Identifies the IsVertical dependency property.
Declaration
public static RadProperty IsVerticalProperty
Field Value
|
RadProperty
|
RangeValueChanged
Occurs when a range value is changed.
Declaration
public RangeChangedEventHandler RangeValueChanged
Field Value
|
RangeChangedEventHandler
|
Properties
AllowKeyNavigation
AutoSize
Gets or sets whether the element automatically adjusts its size to fit its content.
Declaration
public override bool AutoSize { get; set; }
Property Value
|
System.Boolean
|
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
public TrackBarBodyElement BodyElement { get; }
Property Value
|
TrackBarBodyElement
|
CurrentThumb
Gets or sets the currently selected thumb element.
Declaration
public TrackBarThumbElement CurrentThumb { get; set; }
Property Value
|
TrackBarThumbElement
|
IsVertical
Gets or sets the track bar's orientation. When true, the track bar is displayed vertically.
Declaration
public bool IsVertical { get; set; }
Property Value
|
System.Boolean
|
LabelStyle
Gets or sets the style of labels displayed on the track bar.
Declaration
public TrackBarLabelStyle LabelStyle { get; set; }
Property Value
|
TrackBarLabelStyle
|
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.
Declaration
public int LargeChange { get; set; }
Property Value
|
System.Int32
|
LargeTickFrequency
Gets or sets the number of positions between large tick marks on the track bar. A value of zero disables large tick marks.
Declaration
public int LargeTickFrequency { get; set; }
Property Value
|
System.Int32
|
LeftButton
Gets the instance of the left TrackBarArrowButton used for navigation.
Declaration
public TrackBarArrowButton LeftButton { get; }
Property Value
|
TrackBarArrowButton
|
Maximum
Gets or sets the maximum value for the track bar position. The value cannot be less than the minimum value.
Declaration
public float Maximum { get; set; }
Property Value
|
System.Single
|
Minimum
Gets or sets the minimum value for the track bar position. The value cannot be less than zero.
Declaration
public float Minimum { get; set; }
Property Value
|
System.Single
|
Ranges
Gets the collection of ranges defined for the track bar.
Declaration
public TrackBarRangeCollection Ranges { get; }
Property Value
|
TrackBarRangeCollection
|
RightButton
Gets the instance of the right TrackBarArrowButton used for navigation.
Declaration
public TrackBarArrowButton RightButton { get; }
Property Value
|
TrackBarArrowButton
|
ShowButtons
Gets or sets whether the track bar navigation buttons should be displayed.
Declaration
public bool ShowButtons { get; set; }
Property Value
|
System.Boolean
|
ShowSlideArea
Gets or sets whether the slide area should be visible on the track bar.
Declaration
public bool ShowSlideArea { get; set; }
Property Value
|
System.Boolean
|
ShowTicks
Gets or sets the visibility of tick marks on the track bar.
Declaration
public bool ShowTicks { get; set; }
Property Value
|
System.Boolean
|
SlideAreaWidth
Declaration
public int SlideAreaWidth { get; set; }
Property Value
|
System.Int32
|
SliderAreaColor1
Declaration
public Color SliderAreaColor1 { get; set; }
Property Value
|
System.Drawing.Color
|
SliderAreaColor2
Declaration
public Color SliderAreaColor2 { get; set; }
Property Value
|
System.Drawing.Color
|
SliderAreaGradientAngle
Declaration
public float SliderAreaGradientAngle { get; set; }
Property Value
|
System.Single
|
SmallChange
Gets or sets the number of positions that the track bar moves in response to keyboard arrow keys and the track bar buttons.
Declaration
public int SmallChange { get; set; }
Property Value
|
System.Int32
|
SmallTickFrequency
Gets or sets the number of positions between small tick marks on the track bar. A value of zero disables small tick marks.
Declaration
public int SmallTickFrequency { get; set; }
Property Value
|
System.Int32
|
SnapFrequency
Gets or sets the snap frequency behavior of the track bar.
Declaration
public TrackBarSnapFrequency SnapFrequency { get; set; }
Property Value
|
TrackBarSnapFrequency
|
SnapMode
Gets or sets the snap mode behavior of the track bar.
Declaration
public TrackBarSnapModes SnapMode { get; set; }
Property Value
|
TrackBarSnapModes
|
ThumbSize
Declaration
public Size ThumbSize { get; set; }
Property Value
|
System.Drawing.Size
|
ThumbWidth
Declaration
public int ThumbWidth { get; set; }
Property Value
|
System.Int32
|
TickColor
Declaration
public Color TickColor { get; set; }
Property Value
|
System.Drawing.Color
|
TickFrequency
Declaration
public int TickFrequency { get; set; }
Property Value
|
System.Int32
|
TickStyle
Gets or sets whether the track bar's tick marks should be displayed and their style.
Declaration
public TickStyles TickStyle { get; set; }
Property Value
|
TickStyles
|
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
|
TrackBarRangeMode
|
Value
Declaration
public float Value { get; set; }
Property Value
|
System.Single
|
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
|
TrackBarBodyElement
A new instance of TrackBarBodyElement. |
CreateTrackBarLeftArrowButton()
Creates the left arrow button element for the track bar.
Declaration
protected virtual TrackBarArrowButton CreateTrackBarLeftArrowButton()
Returns
|
TrackBarArrowButton
A new instance of TrackBarArrowButton. |
CreateTrackBarRightArrowButton()
Creates the right arrow button element for the track bar.
Declaration
protected virtual TrackBarArrowButton CreateTrackBarRightArrowButton()
Returns
|
TrackBarArrowButton
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
|
System.Drawing.SizeF
scaleFactor
The scaling factor applied. |
Overrides
FireScrollEvent(Int32)
Fires the Scroll event with the specified old value.
Declaration
public void FireScrollEvent(int oldValue)
Parameters
|
System.Int32
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.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available size for the element. |
Returns
|
System.Drawing.SizeF
The desired size of the element. |
Overrides
OnKeyDown(KeyEventArgs)
Handles keyboard input for track bar navigation when AllowKeyNavigation is enabled.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
|
System.Windows.Forms.KeyEventArgs
e
The key event arguments. |
Overrides
OnLabelFormatting(TrackBarLabelElement)
Raises the LabelFormatting event.
Declaration
protected virtual void OnLabelFormatting(TrackBarLabelElement labelElement)
Parameters
|
TrackBarLabelElement
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
|
System.String
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
|
RadPropertyChangedEventArgs
e
The property changed event arguments. |
Overrides
OnRangeValueChanged(RangeChangedEventArgs)
Raises the RangeValueChanged event.
Declaration
protected void OnRangeValueChanged(RangeChangedEventArgs e)
Parameters
|
RangeChangedEventArgs
e
The event arguments containing the changed range information. |
OnScroll(ScrollEventArgs)
Raises the Scroll event.
Declaration
public virtual void OnScroll(ScrollEventArgs e)
Parameters
|
System.Windows.Forms.ScrollEventArgs
e
The scroll event arguments. |
OnTickFormatting(TrackBarTickElement)
Raises the TickFormatting event.
Declaration
protected virtual void OnTickFormatting(TrackBarTickElement tickElement)
Parameters
|
TrackBarTickElement
tickElement
The tick element to be formatted. |
OnValueChanged(EventArgs)
Raises the ValueChanged event.
Declaration
public virtual void OnValueChanged(EventArgs e)
Parameters
|
System.EventArgs
e
The event arguments. |
Events
LabelFormatting
Occurs when a label needs to be formatted.
Declaration
public event LabelFormattingEventHandler LabelFormatting
Event Type
|
LabelFormattingEventHandler
|
Scroll
Occurs when the track bar slider moves.
Declaration
public event ScrollEventHandler Scroll
Event Type
|
System.Windows.Forms.ScrollEventHandler
|
TickFormatting
Occurs when a tick mark needs to be formatted.
Declaration
public event TickFormattingEventHandler TickFormatting
Event Type
|
TickFormattingEventHandler
|
ValueChanged
Occurs when the Value property changes.
Declaration
public event EventHandler ValueChanged
Event Type
|
System.EventHandler
|