RangeSliderThumb Class
The thumb control for a RangeSlider control.
public class RangeSliderThumb : Thumb, IOrientedElement
- Implements:
- IOrientedElement
Constructors
RangeSliderThumb()
Initializes an instance of the class.
public RangeSliderThumb()
Properties
Index
The index of this thumb relative to other thumbs on a RangeSlider where smaller values are closer to the near side (i.e., left side for horizontal slider orientation or top for vertical slider orientation).
Orientation
The orientation of the control.
public Orientation Orientation { get; set; }
Property Value
- Orientation:
The default value is Horizontal.
Value
The range value associated with the thumb.
ValueBadgeDisplayKinds
Indicates when the value badge of a thumb is displayed.
public RangeSliderValueBadgeDisplayKinds ValueBadgeDisplayKinds { get; set; }
Property Value
- RangeSliderValueBadgeDisplayKinds:
The default value is Interacting.
ValueBadgePlacement
Indicates the placement of the value badge.
public RangeSliderPlacement ValueBadgePlacement { get; set; }
Property Value
- RangeSliderPlacement:
The default value is TopLeft.
ValueBadgeStyle
The style to be applied to the value badge.
ValueContentConverter
The converter, if any, that is used to convert a value for display.
public IValueConverter? ValueContentConverter { get; set; }
Property Value
See Also
ValueFormat
The format, if any, to be applied to the value when displayed.
public string? ValueFormat { get; set; }
Property Value
Remarks
This value can be defined as a numeric (e.g., "G") or composite (e.g., "{0:G}") format string.
This property is ignored when a ValueContentConverter is defined.
Methods
CreateValueBadge()
Creates the Badge adornment that will be used to display the current value.
OnCreateAutomationPeer()
Creates an AutomationPeer for the Thumb control.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
A ThumbAutomationPeer for the Thumb control.
OnDraggingChanged(DependencyPropertyChangedEventArgs)
Responds to a change in the value of the IsDragging property.
protected override void OnDraggingChanged(DependencyPropertyChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | DependencyPropertyChangedEventArgs | The event data. |
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.GotKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyboardFocusChangedEventArgs | The KeyboardFocusChangedEventArgs that contains the event data. |
OnLostFocus(RoutedEventArgs)
Raises the LostFocus routed event by using the event data that is provided.
protected override void OnLostFocus(RoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | RoutedEventArgs | A RoutedEventArgs that contains event data. This event data must contain the identifier for the LostFocus event. |
OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.LostKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyboardFocusChangedEventArgs | The KeyboardFocusChangedEventArgs that contains event data. |
OnMouseDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseDown(MouseButtonEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseButtonEventArgs | The MouseButtonEventArgs that contains the event data. This event data reports details about the mouse button that was pressed and the handled state. |
OnMouseMove(MouseEventArgs)
Provides class handling for the MouseMove event.
protected override void OnMouseMove(MouseEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The event data. |
OnTouchDown(TouchEventArgs)
Provides class handling for the TouchDown routed event that occurs when a touch presses inside this element.
protected override void OnTouchDown(TouchEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TouchEventArgs | A TouchEventArgs that contains the event data. |
OnTouchMove(TouchEventArgs)
Provides class handling for the TouchMove routed event that occurs when a touch moves while inside this element.
protected override void OnTouchMove(TouchEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TouchEventArgs | A TouchEventArgs that contains the event data. |
ToString()
Returns the string representation of this object.
Events
ValueChanged
Raised when the value of the Value property changes.
Fields
IndexProperty
Defines the read-only Index property.
public static readonly DependencyProperty IndexProperty
OrientationProperty
Defines the Orientation property.
public static readonly DependencyProperty OrientationProperty
ValueBadgeDisplayKindsProperty
Defines the ValueBadgeDisplayKinds property.
public static readonly DependencyProperty ValueBadgeDisplayKindsProperty
ValueBadgePlacementProperty
Defines the ValueBadgePlacement property.
public static readonly DependencyProperty ValueBadgePlacementProperty
ValueBadgeStyleProperty
Defines the ValueBadgeStyle property.
public static readonly DependencyProperty ValueBadgeStyleProperty
ValueContentConverterProperty
Defines the ValueContentConverter property.
public static readonly DependencyProperty ValueContentConverterProperty
ValueFormatProperty
Defines the ValueFormat property.
public static readonly DependencyProperty ValueFormatProperty
ValueProperty
Defines the Value property.
public static readonly DependencyProperty ValueProperty