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

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

Constructors

Initializes a new instance of the RadSlider class.

C#
public RadSlider()

Fields

ActiveThumbProperty

DependencyProperty

Identifies the ActiveThumb dependency property.

C#
public static readonly DependencyProperty ActiveThumbProperty

AlternateThumbStyleProperty

DependencyProperty

Identifies the AlternateThumbStyle dependency property.

C#
public static readonly DependencyProperty AlternateThumbStyleProperty

Identifies the AutoToolTipTemplate dependency property.

C#
public static readonly DependencyProperty AutoToolTipContentTemplateProperty

Identifies the AutoToolTipPlacement dependency property.

C#
public static readonly DependencyProperty AutoToolTipPlacementProperty

DecreaseHandleStyleProperty

DependencyProperty

Identifies the HandleStyle dependency property.

C#
public static readonly DependencyProperty DecreaseHandleStyleProperty

DelayProperty

DependencyProperty

Identifies the Delay dependency property.

C#
public static readonly DependencyProperty DelayProperty

EnableSideTicksProperty

DependencyProperty

Identifies the EnableSideTicks dependency property.

C#
public static readonly DependencyProperty EnableSideTicksProperty

HandlesVisibilityProperty

DependencyProperty

Identifies the HandlesVisibility dependency property.

C#
public static readonly DependencyProperty HandlesVisibilityProperty

IncreaseHandleStyleProperty

DependencyProperty

Identifies the HandleStyle dependency property.

C#
public static readonly DependencyProperty IncreaseHandleStyleProperty

Identifies the IsDeferredDraggingEnabled dependency property.

C#
public static readonly DependencyProperty IsDeferredDraggingEnabledProperty

IsDirectionReversedProperty

DependencyProperty

Identifies the IsDirectionReversed dependency property.

C#
public static readonly DependencyProperty IsDirectionReversedProperty

IsMouseWheelEnabledProperty

DependencyProperty

Identifies the IsMouseWheelEnabled dependency property.

C#
public static readonly DependencyProperty IsMouseWheelEnabledProperty

Identifies the IsMoveToPointEnabled dependency property.

C#
public static readonly DependencyProperty IsMoveToPointEnabledProperty

IsSnapToTickEnabledProperty

DependencyProperty

Identifies the IsSnapToTickEnabled dependency property.

C#
public static readonly DependencyProperty IsSnapToTickEnabledProperty

Identifies the MiddleThumbClickMode dependency property.

C#
public static readonly DependencyProperty MiddleThumbClickModeProperty

OrientationProperty

DependencyProperty

Identifies the Orientation dependency property.

C#
public static readonly DependencyProperty OrientationProperty

RepeatIntervalProperty

DependencyProperty

Identifies the RepeatInterval dependency property.

C#
public static readonly DependencyProperty RepeatIntervalProperty

ResultTicksProperty

DependencyProperty

Identifies the Ticks dependency property.

C#
[Browsable(false)]
public static readonly DependencyProperty ResultTicksProperty

Identifies the SelectionMiddleThumbStyleProperty dependency property.

C#
public static readonly DependencyProperty SelectionMiddleThumbStyleProperty

StepActionProperty

DependencyProperty

Identifies the StepAction dependency property.

C#
public static readonly DependencyProperty StepActionProperty

ThumbStyleProperty

DependencyProperty

Identifies the ThumbStyle dependency property.

C#
public static readonly DependencyProperty ThumbStyleProperty

ThumbToolTipStyleProperty

DependencyProperty

Identifies the ThumbToolTipStyle dependency property.

C#
public static readonly DependencyProperty ThumbToolTipStyleProperty

ThumbVisibilityProperty

DependencyProperty

Identifies the ThumbVisibility dependency property.

C#
public static readonly DependencyProperty ThumbVisibilityProperty

TickBarStyleProperty

DependencyProperty

Identifies the TickBarStyle dependency property.

C#
public static readonly DependencyProperty TickBarStyleProperty

TickFrequencyProperty

DependencyProperty

Identifies the TickFrequency dependency property.

C#
public static readonly DependencyProperty TickFrequencyProperty

TickPlacementProperty

DependencyProperty

Identifies the TickPlacement dependency property.

C#
public static readonly DependencyProperty TickPlacementProperty

TicksProperty

DependencyProperty

Identifies the Ticks dependency property.

C#
public static readonly DependencyProperty TicksProperty

TickTemplateProperty

DependencyProperty

Identifies the TickTemplate dependency property.

C#
public static readonly DependencyProperty TickTemplateProperty

Identifies the TickTemplateSelector dependency property.

C#
public static readonly DependencyProperty TickTemplateSelectorProperty

TrackStyleProperty

DependencyProperty

Identifies the TrackStyle dependency property.

C#
public static readonly DependencyProperty TrackStyleProperty

Properties

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

C#
public SliderThumbBase ActiveThumb { get; set; }

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

C#
public Style AlternateThumbStyle { get; set; }

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

C#
public DataTemplate AutoToolTipContentTemplate { get; set; }

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.

C#
public AutoToolTipPlacement AutoToolTipPlacement { get; set; }

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

C#
public Style DecreaseHandleStyle { get; set; }

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

C#
public int Delay { get; set; }
Remarks:

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

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

C#
public bool EnableSideTicks { get; set; }
Property Value:

True if side ticks are enabled; otherwise, false.

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

C#
public Visibility HandlesVisibility { get; set; }
Remarks:

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

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

C#
public Style IncreaseHandleStyle { get; set; }

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

C#
public bool IsDeferredDraggingEnabled { get; set; }

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

C#
public bool IsDirectionReversed { get; set; }

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

<p>
	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 <b>IsDirectionReversed</b> property is changed to true, the <xref href="System.Windows.Controls.Primitives.RangeBase.Value?text=Value" data-throw-if-not-resolved="false"></xref> of the <xref href="Telerik.Windows.Controls.RadSlider?text=RadSlider" data-throw-if-not-resolved="false"></xref> decreases as the thumb moves up. 
</p>

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

C#
public bool IsMouseWheelEnabled { get; set; }

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.

C#
public bool IsMoveToPointEnabled { get; set; }
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.

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

C#
public bool IsSnapToTickEnabled { get; set; }

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

C#
public MiddleThumbClickMode MiddleThumbClickMode { get; set; }
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

Orientation

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

C#
public Orientation Orientation { get; set; }

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

C#
public int RepeatInterval { get; set; }
Remarks:

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

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

C#
[Browsable(false)]
public ObservableCollection<double> ResultTicks { get; }

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

C#
public Style SelectionMiddleThumbStyle { get; set; }

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.

C#
public StepAction StepAction { get; set; }

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

C#
public ObservableCollection<SliderThumbBase> Thumbs { get; }

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

C#
public Style ThumbStyle { get; set; }

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

C#
public Style ThumbToolTipStyle { get; set; }
Remarks:

The AutoToolTipPlacement property controls the Thumb ToolTip of the RadSlider.

ThumbVisibility

Visibility

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

C#
public Visibility ThumbVisibility { get; set; }

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

C#
public Style TickBarStyle { get; set; }

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

C#
public double TickFrequency { get; set; }

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

C#
public TickPlacement TickPlacement { get; set; }

Ticks

DoubleCollection

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

C#
public DoubleCollection Ticks { get; set; }

TickTemplate

DataTemplate

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

C#
public DataTemplate TickTemplate { get; set; }

TickTemplateSelector

DataTemplateSelector

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

C#
public DataTemplateSelector TickTemplateSelector { get; set; }

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

C#
public Style TrackStyle { get; set; }

Methods

Begins the initialization process for the RadSlider control.

C#
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.

Changes the visual state of the control.

C#
protected virtual void ChangeVisualState()

Changes the visual state of the control.

C#
protected virtual void ChangeVisualState(bool useTransitions)
Parameters:useTransitionsbool

Finalizes the initialization process of the RadSlider control.

C#
public override void EndInit()

Implements: ISupportInitialize.EndInit()

Remarks:

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

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

C#
public override void OnApplyTemplate()

Overrides: DoubleRangeBase.OnApplyTemplate()

Creates new SliderAutomationPeer when needed.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

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

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Overrides: DoubleRangeBase.OnInitialized(EventArgs)

Called when the is focused changes.

C#
protected virtual void OnIsFocusedChanged()

Called when the IsSelectionRangeEnabled property changes value.

C#
protected override void OnIsSelectionRangeEnabledChanged()

Overrides: DoubleRangeBase.OnIsSelectionRangeEnabledChanged()

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

C#
protected override void OnKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

The KeyEventArgs that contains the event data.

Called when the Maximum property changes.

C#
protected override void OnMaximumChanged(double oldMaximum, double newMaximum)
Parameters:oldMaximumdouble

Old value of the Maximum property.

newMaximumdouble

New value of the Maximum property.

Overrides: DoubleRangeBase.OnMaximumChanged(double, double)

Called when MaximumRangeSpanChanged event occurs.

C#
protected override void OnMaximumRangeSpanChanged(double oldValue, double newValue)
Parameters:oldValuedouble

The old value.

newValuedouble

The new value.

Overrides: DoubleRangeBase.OnMaximumRangeSpanChanged(double, double)

Called when the Minimum property changes.

C#
protected override void OnMinimumChanged(double oldMinimum, double newMinimum)
Parameters:oldMinimumdouble

Old value of the Minimum property.

newMinimumdouble

New value of the Minimum property.

Overrides: DoubleRangeBase.OnMinimumChanged(double, double)

Called when MinimumRangeSpanChanged event occurs.

C#
protected override void OnMinimumRangeSpanChanged(double oldValue, double newValue)
Parameters:oldValuedouble

The old value.

newValuedouble

The new value.

Overrides: DoubleRangeBase.OnMinimumRangeSpanChanged(double, double)

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.

C#
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters:eMouseWheelEventArgs

The MouseWheelEventArgs that contains the event data.

Called when the Orientation property changes value.

C#
protected virtual void OnOrientationChanged()

Called when SelectionEnd changes value.

C#
protected override void OnSelectionEndChanged(double oldValue, double newValue)
Parameters:oldValuedouble

The old value.

newValuedouble

The new value.

Overrides: DoubleRangeBase.OnSelectionEndChanged(double, double)

Called when SelectionStart changes value.

C#
protected override void OnSelectionStartChanged(double oldValue, double newValue)
Parameters:oldValuedouble

The old value.

newValuedouble

The new value.

Overrides: DoubleRangeBase.OnSelectionStartChanged(double, double)

Called when the Value property changes.

C#
protected override void OnValueChanged(double oldValue, double newValue)
Parameters:oldValuedouble

Old value of the Value property.

newValuedouble

New value of the Value property.

Resets the theme.

C#
public void ResetTheme()

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

C#
protected virtual void UpdateTrackLayout()

Events

Occurs when the Thumb control loses mouse capture.

C#
public event EventHandler<RadDragCompletedEventArgs> DragCompleted

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

C#
public event EventHandler<RadDragDeltaEventArgs> DragDelta

Occurs when a thumb starts dragging.

C#
public event EventHandler<RadDragStartedEventArgs> DragStarted
In this article
DefinitionConstructorsRadSlider()FieldsActiveThumbPropertyAlternateThumbStylePropertyAutoToolTipContentTemplatePropertyAutoToolTipPlacementPropertyDecreaseHandleStylePropertyDelayPropertyEnableSideTicksPropertyHandlesVisibilityPropertyIncreaseHandleStylePropertyIsDeferredDraggingEnabledPropertyIsDirectionReversedPropertyIsMouseWheelEnabledPropertyIsMoveToPointEnabledPropertyIsSnapToTickEnabledPropertyMiddleThumbClickModePropertyOrientationPropertyRepeatIntervalPropertyResultTicksPropertySelectionMiddleThumbStylePropertyStepActionPropertyThumbStylePropertyThumbToolTipStylePropertyThumbVisibilityPropertyTickBarStylePropertyTickFrequencyPropertyTickPlacementPropertyTicksPropertyTickTemplatePropertyTickTemplateSelectorPropertyTrackStylePropertyPropertiesActiveThumbAlternateThumbStyleAutoToolTipContentTemplateAutoToolTipPlacementDecreaseHandleStyleDelayEnableSideTicksHandlesVisibilityIncreaseHandleStyleIsDeferredDraggingEnabledIsDirectionReversedIsMouseWheelEnabledIsMoveToPointEnabledIsSnapToTickEnabledMiddleThumbClickModeOrientationRepeatIntervalResultTicksSelectionMiddleThumbStyleStepActionThumbsThumbStyleThumbToolTipStyleThumbVisibilityTickBarStyleTickFrequencyTickPlacementTicksTickTemplateTickTemplateSelectorTrackStyleMethodsBeginInit()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