Class
RadSlider

Represents a slider control that allows users to select a value from a specified range. The RadSlider enables users to make precise selections by sliding a thumb along a track, with support for both single and multiple range selections. It offers various customization options for appearance and behavior, such as styling the thumbs, setting tooltips for enhanced usability, and enabling snapping to tick marks. This control provides user-friendly interaction for modifying values seamlessly within a designated range, making it suitable for applications requiring value selection with visual feedback.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Input")]
[Themable]
public class RadSlider : DoubleRangeBase, IRangeSelector<double>, ISupportInitialize

Inheritance: objectDoubleRangeBaseRadSlider

Derived Classes: PanZoomBarTimelineScrollBar

Implements: IRangeSelector<double>ISupportInitialize

Inherited Members DoubleRangeBase.IsSelectionRangeEnabledPropertyDoubleRangeBase.SelectionStartPropertyDoubleRangeBase.SelectionEndPropertyDoubleRangeBase.MinimumRangeSpanPropertyDoubleRangeBase.MaximumRangeSpanPropertyDoubleRangeBase.SelectionPropertyDoubleRangeBase.IsCoercionSuppressedPropertyDoubleRangeBase.SelectionChangedEventDoubleRangeBase.ArrangeOverride(Size)DoubleRangeBase.OnSelectionChanged()DoubleRangeBase.CoerceSelectionProperties()DoubleRangeBase.CoerceRangeSpanProperties()DoubleRangeBase.IsSelectionRangeEnabledDoubleRangeBase.IsCoercionSuppressedDoubleRangeBase.SelectionRangeDoubleRangeBase.SelectionDoubleRangeBase.SelectionEndDoubleRangeBase.SelectionStartDoubleRangeBase.MinimumRangeSpanDoubleRangeBase.MaximumRangeSpanDoubleRangeBase.IsUserManipulationInProgressDoubleRangeBase.IsInitializingDoubleRangeBase.SelectionStartChangedDoubleRangeBase.SelectionEndChangedDoubleRangeBase.MinimumRangeSpanChangedDoubleRangeBase.MaximumRangeSpanChangedDoubleRangeBase.SelectionChanged

Constructors

RadSlider()

Initializes a new instance of the RadSlider class.

Declaration

cs-api-definition
public RadSlider()

Fields

ActiveThumbProperty

Identifies the ActiveThumb dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ActiveThumbProperty

Field Value

DependencyProperty

AlternateThumbStyleProperty

Identifies the AlternateThumbStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AlternateThumbStyleProperty

Field Value

DependencyProperty

AutoToolTipContentTemplateProperty

Identifies the AutoToolTipTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoToolTipContentTemplateProperty

Field Value

DependencyProperty

AutoToolTipPlacementProperty

Identifies the AutoToolTipPlacement dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoToolTipPlacementProperty

Field Value

DependencyProperty

DecreaseHandleStyleProperty

Identifies the HandleStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DecreaseHandleStyleProperty

Field Value

DependencyProperty

DelayProperty

Identifies the Delay dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DelayProperty

Field Value

DependencyProperty

EnableSideTicksProperty

Identifies the EnableSideTicks dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EnableSideTicksProperty

Field Value

DependencyProperty

HandlesVisibilityProperty

Identifies the HandlesVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HandlesVisibilityProperty

Field Value

DependencyProperty

IncreaseHandleStyleProperty

Identifies the HandleStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IncreaseHandleStyleProperty

Field Value

DependencyProperty

IsDeferredDraggingEnabledProperty

Identifies the IsDeferredDraggingEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsDeferredDraggingEnabledProperty

Field Value

DependencyProperty

IsDirectionReversedProperty

Identifies the IsDirectionReversed dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsDirectionReversedProperty

Field Value

DependencyProperty

IsMouseWheelEnabledProperty

Identifies the IsMouseWheelEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsMouseWheelEnabledProperty

Field Value

DependencyProperty

IsMoveToPointEnabledProperty

Identifies the IsMoveToPointEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsMoveToPointEnabledProperty

Field Value

DependencyProperty

IsSnapToTickEnabledProperty

Identifies the IsSnapToTickEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSnapToTickEnabledProperty

Field Value

DependencyProperty

MiddleThumbClickModeProperty

Identifies the MiddleThumbClickMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MiddleThumbClickModeProperty

Field Value

DependencyProperty

OrientationProperty

Identifies the Orientation dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty OrientationProperty

Field Value

DependencyProperty

RepeatIntervalProperty

Identifies the RepeatInterval dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RepeatIntervalProperty

Field Value

DependencyProperty

ResultTicksProperty

Identifies the Ticks dependency property.

Declaration

cs-api-definition
[Browsable(false)]
public static readonly DependencyProperty ResultTicksProperty

Field Value

DependencyProperty

SelectionMiddleThumbStyleProperty

Identifies the SelectionMiddleThumbStyleProperty dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectionMiddleThumbStyleProperty

Field Value

DependencyProperty

StepActionProperty

Identifies the StepAction dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StepActionProperty

Field Value

DependencyProperty

ThumbStyleProperty

Identifies the ThumbStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ThumbStyleProperty

Field Value

DependencyProperty

ThumbToolTipStyleProperty

Identifies the ThumbToolTipStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ThumbToolTipStyleProperty

Field Value

DependencyProperty

ThumbVisibilityProperty

Identifies the ThumbVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ThumbVisibilityProperty

Field Value

DependencyProperty

TickBarStyleProperty

Identifies the TickBarStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TickBarStyleProperty

Field Value

DependencyProperty

TickFrequencyProperty

Identifies the TickFrequency dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TickFrequencyProperty

Field Value

DependencyProperty

TickPlacementProperty

Identifies the TickPlacement dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TickPlacementProperty

Field Value

DependencyProperty

TickTemplateProperty

Identifies the TickTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TickTemplateProperty

Field Value

DependencyProperty

TickTemplateSelectorProperty

Identifies the TickTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TickTemplateSelectorProperty

Field Value

DependencyProperty

TicksProperty

Identifies the Ticks dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TicksProperty

Field Value

DependencyProperty

TrackStyleProperty

Identifies the TrackStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TrackStyleProperty

Field Value

DependencyProperty

Properties

ActiveThumb

Gets or sets the thumb from slider thumbs, that is active at the moment.

Declaration

cs-api-definition
public SliderThumbBase ActiveThumb { get; set; }

Property Value

SliderThumbBase

AlternateThumbStyle

Gets or sets the style for the right Thumb used internally by the slider, in case of SelectionRangeEnabled is True.

Declaration

cs-api-definition
public Style AlternateThumbStyle { get; set; }

Property Value

Style

AutoToolTipContentTemplate

Gets or sets the template used to display the content of the RadSlider's tooltip.

Declaration

cs-api-definition
public DataTemplate AutoToolTipContentTemplate { get; set; }

Property Value

DataTemplate

AutoToolTipPlacement

Gets or sets whether a tooltip that contains the current value of the RadSlider displays when the Thumb is pressed. If a tooltip is displayed, this property also specifies the placement of the tooltip.

Declaration

cs-api-definition
public AutoToolTipPlacement AutoToolTipPlacement { get; set; }

Property Value

AutoToolTipPlacement

DecreaseHandleStyle

Gets or sets the style for the Decrease Repeat button used internally by the slider.

Declaration

cs-api-definition
public Style DecreaseHandleStyle { get; set; }

Property Value

Style

Delay

Gets or sets the Delay property of the Increase and Decrease handles.

Declaration

cs-api-definition
public int Delay { get; set; }

Property Value

int

Remarks

Each click on any of the handles increases/decreases the value by the amount that is set to the property.

EnableSideTicks

Gets or sets a value indicating whether side ticks are enabled.

Declaration

cs-api-definition
public bool EnableSideTicks { get; set; }

Property Value

bool

True if side ticks are enabled; otherwise, false.

HandlesVisibility

Gets or sets the Visibility property of the Increase and Decrease handles.

Declaration

cs-api-definition
public Visibility HandlesVisibility { get; set; }

Property Value

Visibility

Remarks

Each click on any of the handles increases/decreases the value by the amount that is set to the property.

IncreaseHandleStyle

Gets or sets the style for the Increase Repeat button used internally by the slider.

Declaration

cs-api-definition
public Style IncreaseHandleStyle { get; set; }

Property Value

Style

IsDeferredDraggingEnabled

Gets or sets a value that indicates whether the content is stationary when the user drags the Thumb of RadSlider. This is dependency property.

Declaration

cs-api-definition
public bool IsDeferredDraggingEnabled { get; set; }

Property Value

bool

IsDirectionReversed

Gets or sets the direction of increasing value. This is a dependency property.

Declaration

cs-api-definition
public bool IsDirectionReversed { get; set; }

Property Value

bool

Remarks

The value of this property determines the direction of increasing value of a RadRadSlider.

For example, when you move the thumb control up on a vertical RadSlider when the IsDirectionReversed property is set to false, the Value of the RadSlider increases. If the value of the IsDirectionReversed property is changed to true, the of the RadSlider decreases as the thumb moves up.

IsMouseWheelEnabled

Gets or sets whether the wheel of the mouse can be used for sliding the thumb. This is dependency property.

Declaration

cs-api-definition
public bool IsMouseWheelEnabled { get; set; }

Property Value

bool

IsMoveToPointEnabled

Gets or sets a value that indicates whether the thumb of a RadSlider moves immediately to the location of the mouse click that occurs while the mouse pointer pauses on the RadSlider track. This is a dependency property.

Declaration

cs-api-definition
public bool IsMoveToPointEnabled { get; set; }

Property Value

bool

Remarks

When this property is set to false and a mouse click occurs along the RadSlider away from the thumb, the thumb moves in the direction of the mouse click. Instead of moving immediately to the mouse click location, the thumb moves a distance that is defined by the RepeatInterval property for each mouse click. The effect of multiple mouse clicks can be emulated by pressing and holding the left mouse button until the thumb is repositioned to the desired location.

IsSnapToTickEnabled

Gets or sets a value that indicates whether the RadSlider automatically moves the thumb to the closest tick mark. This is a dependency property.

Declaration

cs-api-definition
public bool IsSnapToTickEnabled { get; set; }

Property Value

bool

MiddleThumbClickMode

Gets or sets a value that determines the click action of the Middle Thumb of RadSlider. This is dependency property.

Declaration

cs-api-definition
public MiddleThumbClickMode MiddleThumbClickMode { get; set; }

Property Value

MiddleThumbClickMode

Remarks

The MiddleThumbClickMode actions will take effect only in there is no drag action of the middle thumb. If the middle thumb is dragged, then no click mode action will be performed.

Orientation

Gets or sets the orientation of a RadSlider. This is a dependency property.

Declaration

cs-api-definition
public Orientation Orientation { get; set; }

Property Value

Orientation

RepeatInterval

Gets or sets the RepeatInterval property of the Increase and Decrease handles.

Declaration

cs-api-definition
public int RepeatInterval { get; set; }

Property Value

int

Remarks

Each click on any of the handles increases/decreases the value by the amount that is set to the property.

ResultTicks

Gets or sets the style for the border track used internally by the slider.

Declaration

cs-api-definition
[Browsable(false)]
public ObservableCollection<double> ResultTicks { get; }

Property Value

ObservableCollection<double>

SelectionMiddleThumbStyle

Gets or sets the style for the middle Thumb used internally by the slider, in case of SelectionRangeEnabled is True.

Declaration

cs-api-definition
public Style SelectionMiddleThumbStyle { get; set; }

Property Value

Style

StepAction

This property determines how the slider will behave when in range mode. Setting this property to ChangeRange will move only the corresponding thumb when Large or Small step is performed. Setting the property to MoveRange will move the whole range when Large or Small change has been performed.

Declaration

cs-api-definition
public StepAction StepAction { get; set; }

Property Value

StepAction

ThumbStyle

Gets or sets the style for the Thumbs used internally by the slider.

Declaration

cs-api-definition
public Style ThumbStyle { get; set; }

Property Value

Style

ThumbToolTipStyle

Gets or sets the style for the ToolTip of the Thumb used internally by the slider.

Declaration

cs-api-definition
public Style ThumbToolTipStyle { get; set; }

Property Value

Style

Remarks

The AutoToolTipPlacement property controls the Thumb ToolTip of the RadSlider.

ThumbVisibility

Gets or sets the visibility of the thumb(s) in RadSlider.

Declaration

cs-api-definition
public Visibility ThumbVisibility { get; set; }

Property Value

Visibility

Thumbs

Gets the collection that contains all the thumbs in the control.

Declaration

cs-api-definition
public ObservableCollection<SliderThumbBase> Thumbs { get; }

Property Value

ObservableCollection<SliderThumbBase>

TickBarStyle

Gets or sets the style for the RadTickBar used internally by the slider.

Declaration

cs-api-definition
public Style TickBarStyle { get; set; }

Property Value

Style

TickFrequency

Gets or sets the interval between tick marks. This is a dependency property.

Declaration

cs-api-definition
public double TickFrequency { get; set; }

Property Value

double

TickPlacement

Gets or sets the position of tick marks with respect to the track of the RadSlider. This is a dependency property.

Declaration

cs-api-definition
public TickPlacement TickPlacement { get; set; }

Property Value

TickPlacement

TickTemplate

Gets or sets the TickTemplate that will be used to represent a single tick on the TickBar.

Declaration

cs-api-definition
public DataTemplate TickTemplate { get; set; }

Property Value

DataTemplate

TickTemplateSelector

Gets or sets the TickTemplateSelector that will be used to pick a template for the tick marks.

Declaration

cs-api-definition
public DataTemplateSelector TickTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Ticks

Gets or sets the positions of the tick marks to display for a RadSlider. This is a dependency property.

Declaration

cs-api-definition
public DoubleCollection Ticks { get; set; }

Property Value

DoubleCollection

TrackStyle

Gets or sets the style for the track used internally by the slider.

Declaration

cs-api-definition
public Style TrackStyle { get; set; }

Property Value

Style

Methods

BeginInit()

Begins the initialization process for the RadSlider control.

Declaration

cs-api-definition
public override void BeginInit()

Implements ISupportInitialize.BeginInit()

Remarks

This method should be called before setting properties that affect layout or behavior, ensuring that the control is in a state suitable for configuration.

ChangeVisualState()

Changes the visual state of the control.

Declaration

cs-api-definition
protected virtual void ChangeVisualState()

ChangeVisualState(bool)

Changes the visual state of the control.

Declaration

cs-api-definition
protected virtual void ChangeVisualState(bool useTransitions)

Parameters

useTransitions

bool

EndInit()

Finalizes the initialization process of the RadSlider control.

Declaration

cs-api-definition
public override void EndInit()

Implements ISupportInitialize.EndInit()

Remarks

This method is typically called after all of the properties have been set on the control.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

Declaration

cs-api-definition
public override void OnApplyTemplate()

Overrides DoubleRangeBase.OnApplyTemplate()

OnCreateAutomationPeer()

Creates new SliderAutomationPeer when needed.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

Overrides DoubleRangeBase.OnInitialized(EventArgs)

OnIsFocusedChanged()

Called when the is focused changes.

Declaration

cs-api-definition
protected virtual void OnIsFocusedChanged()

OnIsSelectionRangeEnabledChanged()

Called when the IsSelectionRangeEnabled property changes value.

Declaration

cs-api-definition
protected override void OnIsSelectionRangeEnabledChanged()

Overrides DoubleRangeBase.OnIsSelectionRangeEnabledChanged()

OnKeyDown(KeyEventArgs)

Handles the KeyDown event for the RadSlider control, updating the value or selection based on the pressed key.

Declaration

cs-api-definition
protected override void OnKeyDown(KeyEventArgs e)

Parameters

e

KeyEventArgs

The KeyEventArgs that contains the event data.

OnMaximumChanged(double, double)

Called when the Maximum property changes.

Declaration

cs-api-definition
protected override void OnMaximumChanged(double oldMaximum, double newMaximum)

Parameters

oldMaximum

double

Old value of the Maximum property.

newMaximum

double

New value of the Maximum property.

Overrides DoubleRangeBase.OnMaximumChanged(double, double)

OnMaximumRangeSpanChanged(double, double)

Called when MaximumRangeSpanChanged event occurs.

Declaration

cs-api-definition
protected override void OnMaximumRangeSpanChanged(double oldValue, double newValue)

Parameters

oldValue

double

The old value.

newValue

double

The new value.

Overrides DoubleRangeBase.OnMaximumRangeSpanChanged(double, double)

OnMinimumChanged(double, double)

Called when the Minimum property changes.

Declaration

cs-api-definition
protected override void OnMinimumChanged(double oldMinimum, double newMinimum)

Parameters

oldMinimum

double

Old value of the Minimum property.

newMinimum

double

New value of the Minimum property.

Overrides DoubleRangeBase.OnMinimumChanged(double, double)

OnMinimumRangeSpanChanged(double, double)

Called when MinimumRangeSpanChanged event occurs.

Declaration

cs-api-definition
protected override void OnMinimumRangeSpanChanged(double oldValue, double newValue)

Parameters

oldValue

double

The old value.

newValue

double

The new value.

Overrides DoubleRangeBase.OnMinimumRangeSpanChanged(double, double)

OnMouseWheel(MouseWheelEventArgs)

Invoked when an unhandled  attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

Declaration

cs-api-definition
protected override void OnMouseWheel(MouseWheelEventArgs e)

Parameters

e

MouseWheelEventArgs

The MouseWheelEventArgs that contains the event data.

OnOrientationChanged()

Called when the Orientation property changes value.

Declaration

cs-api-definition
protected virtual void OnOrientationChanged()

OnSelectionEndChanged(double, double)

Called when SelectionEnd changes value.

Declaration

cs-api-definition
protected override void OnSelectionEndChanged(double oldValue, double newValue)

Parameters

oldValue

double

The old value.

newValue

double

The new value.

Overrides DoubleRangeBase.OnSelectionEndChanged(double, double)

OnSelectionStartChanged(double, double)

Called when SelectionStart changes value.

Declaration

cs-api-definition
protected override void OnSelectionStartChanged(double oldValue, double newValue)

Parameters

oldValue

double

The old value.

newValue

double

The new value.

Overrides DoubleRangeBase.OnSelectionStartChanged(double, double)

OnValueChanged(double, double)

Called when the Value property changes.

Declaration

cs-api-definition
protected override void OnValueChanged(double oldValue, double newValue)

Parameters

oldValue

double

Old value of the Value property.

newValue

double

New value of the Value property.

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

UpdateTrackLayout()

This method will take the current min, max, and value to calculate and layout the current control measurements.

Declaration

cs-api-definition
protected virtual void UpdateTrackLayout()

Events

DragCompleted

Occurs when the Thumb control loses mouse capture.

Declaration

cs-api-definition
public event EventHandler<RadDragCompletedEventArgs> DragCompleted

Event Value

EventHandler<RadDragCompletedEventArgs>

DragDelta

Occurs when the mouse moves while the thumb is still on focus.

Declaration

cs-api-definition
public event EventHandler<RadDragDeltaEventArgs> DragDelta

Event Value

EventHandler<RadDragDeltaEventArgs>

DragStarted

Occurs when a thumb starts dragging.

Declaration

cs-api-definition
public event EventHandler<RadDragStartedEventArgs> DragStarted

Event Value

EventHandler<RadDragStartedEventArgs>

In this article
DefinitionConstructorsRadSlider()FieldsActiveThumbPropertyAlternateThumbStylePropertyAutoToolTipContentTemplatePropertyAutoToolTipPlacementPropertyDecreaseHandleStylePropertyDelayPropertyEnableSideTicksPropertyHandlesVisibilityPropertyIncreaseHandleStylePropertyIsDeferredDraggingEnabledPropertyIsDirectionReversedPropertyIsMouseWheelEnabledPropertyIsMoveToPointEnabledPropertyIsSnapToTickEnabledPropertyMiddleThumbClickModePropertyOrientationPropertyRepeatIntervalPropertyResultTicksPropertySelectionMiddleThumbStylePropertyStepActionPropertyThumbStylePropertyThumbToolTipStylePropertyThumbVisibilityPropertyTickBarStylePropertyTickFrequencyPropertyTickPlacementPropertyTickTemplatePropertyTickTemplateSelectorPropertyTicksPropertyTrackStylePropertyPropertiesActiveThumbAlternateThumbStyleAutoToolTipContentTemplateAutoToolTipPlacementDecreaseHandleStyleDelayEnableSideTicksHandlesVisibilityIncreaseHandleStyleIsDeferredDraggingEnabledIsDirectionReversedIsMouseWheelEnabledIsMoveToPointEnabledIsSnapToTickEnabledMiddleThumbClickModeOrientationRepeatIntervalResultTicksSelectionMiddleThumbStyleStepActionThumbStyleThumbToolTipStyleThumbVisibilityThumbsTickBarStyleTickFrequencyTickPlacementTickTemplateTickTemplateSelectorTicksTrackStyleMethodsBeginInit()ChangeVisualState()ChangeVisualState(bool)EndInit()OnApplyTemplate()OnCreateAutomationPeer()OnInitialized(EventArgs)OnIsFocusedChanged()OnIsSelectionRangeEnabledChanged()OnKeyDown(KeyEventArgs)OnMaximumChanged(double, double)OnMaximumRangeSpanChanged(double, double)OnMinimumChanged(double, double)OnMinimumRangeSpanChanged(double, double)OnMouseWheel(MouseWheelEventArgs)OnOrientationChanged()OnSelectionEndChanged(double, double)OnSelectionStartChanged(double, double)OnValueChanged(double, double)ResetTheme()UpdateTrackLayout()EventsDragCompletedDragDeltaDragStarted
Not finding the help you need?
Contact Support