In This Article

RangeSliderThumb Class

The thumb control for a RangeSlider control.

[PseudoClasses(new string[] { ":horizontal", ":vertical" })]
[PseudoClasses(new string[] { ":left", ":right", ":top", ":bottom" })]
public class RangeSliderThumb : Thumb, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, INamed, IInputElement, IDataTemplateHost, ISetterValue, IOrientedElement
Inheritance:
object AvaloniaObject Animatable StyledElement Visual Layoutable Interactive InputElement Control TemplatedControl Thumb object
Implements:
IDataContextProvider ILogical IThemeVariantHost IResourceHost IResourceNode IStyleHost ISetLogicalParent ISetInheritanceParent INamed IInputElement IDataTemplateHost ISetterValue 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).

public int Index { get; }

Property Value

int

IsDragging

Indicates if the thumb is currently being dragged.

public bool IsDragging { get; set; }

Property Value

bool

Orientation

The orientation of the control.

public Orientation Orientation { get; set; }

Property Value

Orientation:

The default value is Avalonia.Layout.Orientation.Horizontal.

Value

The range value associated with the thumb.

public double Value { get; set; }

Property Value

double

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.

ValueBadgeTheme

The theme to be applied to the value badge.

public ControlTheme? ValueBadgeTheme { get; set; }

Property Value

ControlTheme

ValueContentConverter

The converter, if any, that is used to convert a value for display.

public IValueConverter? ValueContentConverter { get; set; }

Property Value

IValueConverter

See Also

ValueFormat

The format, if any, to be applied to the value when displayed.

public string? ValueFormat { get; set; }

Property Value

string

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.

protected Badge CreateValueBadge()

Returns

Badge

OnCreateAutomationPeer()

Returns a new, type-specific Avalonia.Automation.Peers.AutomationPeer implementation for the control.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific Avalonia.Automation.Peers.AutomationPeer implementation.

OnDragCompleted(VectorEventArgs)

Invoked when an unhandled Avalonia.Controls.Primitives.Thumb.DragCompletedEvent 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 OnDragCompleted(VectorEventArgs e)
Parameter Type Description
e VectorEventArgs

Data about the event.

OnDragStarted(VectorEventArgs)

Invoked when an unhandled Avalonia.Controls.Primitives.Thumb.DragStartedEvent 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 OnDragStarted(VectorEventArgs e)
Parameter Type Description
e VectorEventArgs

Data about the event.

OnGotFocus(FocusChangedEventArgs)

Invoked when an unhandled Avalonia.Input.InputElement.GotFocusEvent 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 OnGotFocus(FocusChangedEventArgs e)
Parameter Type Description
e FocusChangedEventArgs

Data about the event.

OnLoaded(RoutedEventArgs)

Raises the Avalonia.Controls.Control.Loaded event.

protected override void OnLoaded(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The event args.

OnLostFocus(FocusChangedEventArgs)

Invoked when an unhandled Avalonia.Input.InputElement.LostFocusEvent 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 OnLostFocus(FocusChangedEventArgs e)
Parameter Type Description
e FocusChangedEventArgs

Data about the event.

OnPointerMoved(PointerEventArgs)

Invoked when an unhandled Avalonia.Input.InputElement.PointerMovedEvent 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 OnPointerMoved(PointerEventArgs e)
Parameter Type Description
e PointerEventArgs

Data about the event.

OnPointerPressed(PointerPressedEventArgs)

Invoked when an unhandled Avalonia.Input.InputElement.PointerPressedEvent 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 OnPointerPressed(PointerPressedEventArgs e)
Parameter Type Description
e PointerPressedEventArgs

Data about the event.

OnUnloaded(RoutedEventArgs)

Raises the Avalonia.Controls.Control.Unloaded event.

protected override void OnUnloaded(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The event args.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Fields

IndexProperty

Defines the Index property.

public static readonly DirectProperty<RangeSliderThumb, int> IndexProperty

IsDraggingProperty

Defines the IsDragging property.

public static readonly StyledProperty<bool> IsDraggingProperty

OrientationProperty

Defines the Orientation property.

public static readonly StyledProperty<Orientation> OrientationProperty

ValueBadgeDisplayKindsProperty

Defines the ValueBadgeDisplayKinds property.

public static readonly StyledProperty<RangeSliderValueBadgeDisplayKinds> ValueBadgeDisplayKindsProperty

ValueBadgePlacementProperty

Defines the ValueBadgePlacement property.

public static readonly StyledProperty<RangeSliderPlacement> ValueBadgePlacementProperty

ValueBadgeThemeProperty

Defines the ValueBadgeTheme property.

public static readonly StyledProperty<ControlTheme?> ValueBadgeThemeProperty

ValueContentConverterProperty

Defines the ValueContentConverter property.

public static readonly StyledProperty<IValueConverter?> ValueContentConverterProperty

ValueFormatProperty

Defines the ValueFormat property.

public static readonly StyledProperty<string?> ValueFormatProperty

ValueProperty

Defines the Value property.

public static readonly StyledProperty<double> ValueProperty

Inherited Members

  • Thumb.DragStartedEvent
  • Thumb.DragDeltaEvent
  • Thumb.DragCompletedEvent
  • Thumb.OnDragDelta(VectorEventArgs)
  • Thumb.OnPointerCaptureLost(PointerCaptureLostEventArgs)
  • Thumb.OnPointerReleased(PointerReleasedEventArgs)
  • Thumb.DragStarted
  • Thumb.DragDelta
  • Thumb.DragCompleted
  • TemplatedControl.BackgroundProperty
  • TemplatedControl.BackgroundSizingProperty
  • TemplatedControl.BorderBrushProperty
  • TemplatedControl.BorderThicknessProperty
  • TemplatedControl.CornerRadiusProperty
  • TemplatedControl.FontFamilyProperty
  • TemplatedControl.FontFeaturesProperty
  • TemplatedControl.FontSizeProperty
  • TemplatedControl.FontStyleProperty
  • TemplatedControl.FontWeightProperty
  • TemplatedControl.FontStretchProperty
  • TemplatedControl.ForegroundProperty
  • TemplatedControl.LetterSpacingProperty
  • TemplatedControl.PaddingProperty
  • TemplatedControl.TemplateProperty
  • TemplatedControl.IsTemplateFocusTargetProperty
  • TemplatedControl.TemplateAppliedEvent
  • TemplatedControl.GetIsTemplateFocusTarget(Control)
  • TemplatedControl.SetIsTemplateFocusTarget(Control, bool)
  • TemplatedControl.ApplyTemplate()
  • TemplatedControl.GetTemplateFocusTarget()
  • TemplatedControl.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
  • TemplatedControl.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
  • TemplatedControl.OnApplyTemplate(TemplateAppliedEventArgs)
  • TemplatedControl.OnTemplateChanged(AvaloniaPropertyChangedEventArgs)
  • TemplatedControl.Background
  • TemplatedControl.BackgroundSizing
  • TemplatedControl.BorderBrush
  • TemplatedControl.BorderThickness
  • TemplatedControl.CornerRadius
  • TemplatedControl.FontFamily
  • TemplatedControl.FontFeatures
  • TemplatedControl.FontSize
  • TemplatedControl.FontStyle
  • TemplatedControl.FontWeight
  • TemplatedControl.FontStretch
  • TemplatedControl.Foreground
  • TemplatedControl.LetterSpacing
  • TemplatedControl.Padding
  • TemplatedControl.Template
  • TemplatedControl.TemplateApplied
  • Control.FocusAdornerProperty
  • Control.TagProperty
  • Control.ContextMenuProperty
  • Control.ContextFlyoutProperty
  • Control.RequestBringIntoViewEvent
  • Control.LoadedEvent
  • Control.UnloadedEvent
  • Control.SizeChangedEvent
  • Control.OnSizeChanged(SizeChangedEventArgs)
  • Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
  • Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
  • Control.OnKeyUp(KeyEventArgs)
  • Control.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
  • Control.UpdateDataValidation(AvaloniaProperty, BindingValueType, Exception)
  • Control.FocusAdorner
  • Control.DataTemplates
  • Control.ContextMenu
  • Control.ContextFlyout
  • Control.IsLoaded
  • Control.Tag
  • Control.Loaded
  • Control.Unloaded
  • Control.SizeChanged
  • InputElement.FocusableProperty
  • InputElement.IsEnabledProperty
  • InputElement.IsEffectivelyEnabledProperty
  • InputElement.CursorProperty
  • InputElement.IsKeyboardFocusWithinProperty
  • InputElement.IsFocusedProperty
  • InputElement.IsHitTestVisibleProperty
  • InputElement.IsPointerOverProperty
  • InputElement.IsTabStopProperty
  • InputElement.GotFocusEvent
  • InputElement.GettingFocusEvent
  • InputElement.LostFocusEvent
  • InputElement.LosingFocusEvent
  • InputElement.KeyDownEvent
  • InputElement.KeyUpEvent
  • InputElement.TabIndexProperty
  • InputElement.TextInputEvent
  • InputElement.TextInputMethodClientRequestedEvent
  • InputElement.PointerEnteredEvent
  • InputElement.PointerExitedEvent
  • InputElement.PointerMovedEvent
  • InputElement.PointerPressedEvent
  • InputElement.PointerReleasedEvent
  • InputElement.PointerCaptureLostEvent
  • InputElement.PointerWheelChangedEvent
  • InputElement.ContextRequestedEvent
  • InputElement.ContextCanceledEvent
  • InputElement.IsHoldingEnabledProperty
  • InputElement.IsHoldWithMouseEnabledProperty
  • InputElement.PinchEvent
  • InputElement.PinchEndedEvent
  • InputElement.PullGestureEvent
  • InputElement.PullGestureEndedEvent
  • InputElement.SwipeGestureEvent
  • InputElement.SwipeGestureEndedEvent
  • InputElement.ScrollGestureEvent
  • InputElement.ScrollGestureInertiaStartingEvent
  • InputElement.ScrollGestureEndedEvent
  • InputElement.PointerTouchPadGestureMagnifyEvent
  • InputElement.PointerTouchPadGestureRotateEvent
  • InputElement.PointerTouchPadGestureSwipeEvent
  • InputElement.TappedEvent
  • InputElement.RightTappedEvent
  • InputElement.HoldingEvent
  • InputElement.DoubleTappedEvent
  • InputElement.Focus(NavigationMethod, KeyModifiers)
  • InputElement.OnAccessKey(RoutedEventArgs)
  • InputElement.OnGettingFocus(FocusChangingEventArgs)
  • InputElement.OnLosingFocus(FocusChangingEventArgs)
  • InputElement.OnKeyDown(KeyEventArgs)
  • InputElement.OnTextInput(TextInputEventArgs)
  • InputElement.OnPointerEntered(PointerEventArgs)
  • InputElement.OnPointerExited(PointerEventArgs)
  • InputElement.GetNextTabStopOverride()
  • InputElement.GetPreviousTabStopOverride()
  • InputElement.GetFirstFocusableElementOverride()
  • InputElement.GetLastFocusableElementOverride()
  • InputElement.ProcessTabStopOverride(IInputElement, IInputElement, bool, bool, ref IInputElement)
  • InputElement.ProcessCandidateTabStopOverride(IInputElement, IInputElement, IInputElement, bool, ref IInputElement)
  • InputElement.OnPointerWheelChanged(PointerWheelEventArgs)
  • InputElement.OnTapped(TappedEventArgs)
  • InputElement.OnRightTapped(TappedEventArgs)
  • InputElement.OnDoubleTapped(TappedEventArgs)
  • InputElement.OnHolding(HoldingRoutedEventArgs)
  • InputElement.UpdateIsEffectivelyEnabled()
  • InputElement.GetIsHoldingEnabled(StyledElement)
  • InputElement.SetIsHoldingEnabled(StyledElement, bool)
  • InputElement.GetIsHoldWithMouseEnabled(StyledElement)
  • InputElement.SetIsHoldWithMouseEnabled(StyledElement, bool)
  • InputElement.Focusable
  • InputElement.IsEnabled
  • InputElement.Cursor
  • InputElement.IsKeyboardFocusWithin
  • InputElement.IsFocused
  • InputElement.IsHitTestVisible
  • InputElement.IsPointerOver
  • InputElement.IsTabStop
  • InputElement.IsEffectivelyEnabled
  • InputElement.TabIndex
  • InputElement.KeyBindings
  • InputElement.IsEnabledCore
  • InputElement.GestureRecognizers
  • InputElement.GotFocus
  • InputElement.GettingFocus
  • InputElement.LostFocus
  • InputElement.LosingFocus
  • InputElement.KeyDown
  • InputElement.KeyUp
  • InputElement.TextInput
  • InputElement.TextInputMethodClientRequested
  • InputElement.PointerEntered
  • InputElement.PointerExited
  • InputElement.PointerMoved
  • InputElement.PointerPressed
  • InputElement.PointerReleased
  • InputElement.PointerCaptureLost
  • InputElement.PointerWheelChanged
  • InputElement.ContextRequested
  • InputElement.ContextCanceled
  • InputElement.Pinch
  • InputElement.PinchEnded
  • InputElement.PullGesture
  • InputElement.PullGestureEnded
  • InputElement.ScrollGesture
  • InputElement.ScrollGestureInertiaStarting
  • InputElement.ScrollGestureEnded
  • InputElement.PointerTouchPadGestureMagnify
  • InputElement.PointerTouchPadGestureRotate
  • InputElement.SwipeGesture
  • InputElement.SwipeGestureEnded
  • InputElement.PointerTouchPadGestureSwipe
  • InputElement.Tapped
  • InputElement.RightTapped
  • InputElement.Holding
  • InputElement.DoubleTapped
  • Interactive.AddHandler(RoutedEvent, Delegate, RoutingStrategies, bool)
  • Interactive.AddHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>, RoutingStrategies, bool)
  • Interactive.RemoveHandler(RoutedEvent, Delegate)
  • Interactive.RemoveHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>)
  • Interactive.RaiseEvent(RoutedEventArgs)
  • Interactive.BuildEventRoute(RoutedEvent)
  • Layoutable.DesiredSizeProperty
  • Layoutable.WidthProperty
  • Layoutable.HeightProperty
  • Layoutable.MinWidthProperty
  • Layoutable.MaxWidthProperty
  • Layoutable.MinHeightProperty
  • Layoutable.MaxHeightProperty
  • Layoutable.MarginProperty
  • Layoutable.HorizontalAlignmentProperty
  • Layoutable.VerticalAlignmentProperty
  • Layoutable.UseLayoutRoundingProperty
  • Layoutable.UpdateLayout()
  • Layoutable.Measure(Size)
  • Layoutable.Arrange(Rect)
  • Layoutable.InvalidateMeasure()
  • Layoutable.InvalidateArrange()
  • Layoutable.AffectsMeasure<T>(params AvaloniaProperty[])
  • Layoutable.AffectsArrange<T>(params AvaloniaProperty[])
  • Layoutable.MeasureCore(Size)
  • Layoutable.MeasureOverride(Size)
  • Layoutable.ArrangeCore(Rect)
  • Layoutable.ArrangeOverride(Size)
  • Layoutable.OnMeasureInvalidated()
  • Layoutable.OnVisualParentChanged(Visual, Visual)
  • Layoutable.Width
  • Layoutable.Height
  • Layoutable.MinWidth
  • Layoutable.MaxWidth
  • Layoutable.MinHeight
  • Layoutable.MaxHeight
  • Layoutable.Margin
  • Layoutable.HorizontalAlignment
  • Layoutable.VerticalAlignment
  • Layoutable.DesiredSize
  • Layoutable.IsMeasureValid
  • Layoutable.IsArrangeValid
  • Layoutable.UseLayoutRounding
  • Layoutable.EffectiveViewportChanged
  • Layoutable.LayoutUpdated
  • Visual.BoundsProperty
  • Visual.ClipToBoundsProperty
  • Visual.ClipProperty
  • Visual.IsVisibleProperty
  • Visual.OpacityProperty
  • Visual.OpacityMaskProperty
  • Visual.CacheModeProperty
  • Visual.EffectProperty
  • Visual.HasMirrorTransformProperty
  • Visual.RenderTransformProperty
  • Visual.RenderTransformOriginProperty
  • Visual.FlowDirectionProperty
  • Visual.VisualParentProperty
  • Visual.ZIndexProperty
  • Visual.GetFlowDirection(Visual)
  • Visual.SetFlowDirection(Visual, FlowDirection)
  • Visual.InvalidateVisual()
  • Visual.Render(DrawingContext)
  • Visual.AffectsRender<T>(params AvaloniaProperty[])
  • Visual.LogicalChildrenCollectionChanged(object, NotifyCollectionChangedEventArgs)
  • Visual.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
  • Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
  • Visual.InvalidateMirrorTransform()
  • Visual.Bounds
  • Visual.ClipToBounds
  • Visual.Clip
  • Visual.IsEffectivelyVisible
  • Visual.IsVisible
  • Visual.Opacity
  • Visual.OpacityMask
  • Visual.CacheMode
  • Visual.Effect
  • Visual.HasMirrorTransform
  • Visual.RenderTransform
  • Visual.RenderTransformOrigin
  • Visual.FlowDirection
  • Visual.ZIndex
  • Visual.VisualChildren
  • Visual.VisualRoot
  • Visual.BypassFlowDirectionPolicies
  • Visual.AttachedToVisualTree
  • Visual.DetachedFromVisualTree
  • StyledElement.DataContextProperty
  • StyledElement.NameProperty
  • StyledElement.ParentProperty
  • StyledElement.TemplatedParentProperty
  • StyledElement.ThemeProperty
  • StyledElement.BeginInit()
  • StyledElement.EndInit()
  • StyledElement.ApplyStyling()
  • StyledElement.InitializeIfNeeded()
  • StyledElement.TryGetResource(object, ThemeVariant, out object)
  • StyledElement.OnDataContextChanged(EventArgs)
  • StyledElement.OnDataContextBeginUpdate()
  • StyledElement.OnDataContextEndUpdate()
  • StyledElement.OnInitialized()
  • StyledElement.Name
  • StyledElement.Classes
  • StyledElement.DataContext
  • StyledElement.IsInitialized
  • StyledElement.Styles
  • StyledElement.StyleKey
  • StyledElement.Resources
  • StyledElement.TemplatedParent
  • StyledElement.Theme
  • StyledElement.LogicalChildren
  • StyledElement.PseudoClasses
  • StyledElement.StyleKeyOverride
  • StyledElement.Parent
  • StyledElement.ActualThemeVariant
  • StyledElement.AttachedToLogicalTree
  • StyledElement.DetachedFromLogicalTree
  • StyledElement.DataContextChanged
  • StyledElement.Initialized
  • StyledElement.ResourcesChanged
  • StyledElement.ActualThemeVariantChanged
  • Animatable.TransitionsProperty
  • Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)
  • Animatable.Transitions
  • AvaloniaObject.CheckAccess()
  • AvaloniaObject.VerifyAccess()
  • AvaloniaObject.ClearValue(AvaloniaProperty)
  • AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)
  • AvaloniaObject.ClearValue<T>(StyledProperty<T>)
  • AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)
  • AvaloniaObject.Equals(object)
  • AvaloniaObject.GetHashCode()
  • AvaloniaObject.GetValue(AvaloniaProperty)
  • AvaloniaObject.GetValue<T>(StyledProperty<T>)
  • AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)
  • AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)
  • AvaloniaObject.IsAnimating(AvaloniaProperty)
  • AvaloniaObject.IsSet(AvaloniaProperty)
  • AvaloniaObject.SetValue(AvaloniaProperty, object, BindingPriority)
  • AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
  • AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
  • AvaloniaObject.SetCurrentValue(AvaloniaProperty, object)
  • AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
  • AvaloniaObject.Bind(AvaloniaProperty, BindingBase)
  • AvaloniaObject.Bind(AvaloniaProperty, IObservable<object>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<object>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<T>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<BindingValue<T>>, BindingPriority)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<object>)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<T>)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<T>>)
  • AvaloniaObject.CoerceValue(AvaloniaProperty)
  • AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)
  • AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)
  • AvaloniaObject.InheritanceParent
  • AvaloniaObject.this[AvaloniaProperty]
  • AvaloniaObject.this[IndexerDescriptor]
  • AvaloniaObject.Dispatcher
  • AvaloniaObject.PropertyChanged
  • object.GetType()
  • object.MemberwiseClone()
  • object.Equals(object, object)
  • object.ReferenceEquals(object, object)

Extension Methods