Class Thumb
Represents a control that can be dragged by the user.
Inherited Members
Namespace: System.Windows.Controls.Primitives
Assembly: OpenSilver.dll
Syntax
public sealed class Thumb : Control, IControl, IFrameworkElement, IUIElement, IDependencyObject
Constructors
| Improve this Doc View SourceThumb()
Initializes a new instance of the Thumb class.
Declaration
public Thumb()
Fields
| Improve this Doc View SourceIsDraggingProperty
Identifies the IsDragging dependency property.
Declaration
public static readonly DependencyProperty IsDraggingProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IsFocusedProperty
Gets the identifier for the IsFocused dependency property.
Declaration
public static readonly DependencyProperty IsFocusedProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceIsDragging
Gets whether the Thumb control has focus and mouse capture.
Declaration
public bool IsDragging { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the Thumb control has focus and mouse capture; otherwise false. The default is false. |
IsFocused
Gets whether the thumb has focus.
Declaration
public bool IsFocused { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
true to indicate the thumb has focus; otherwise false. The default is false.
Methods
| Improve this Doc View SourceCancelDrag()
Cancels a drag operation for the Thumb.
Declaration
public void CancelDrag()
OnApplyTemplate()
Builds the visual tree for the Thumb control when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnCreateAutomationPeer()
When implemented in a derived class, returns class-specific AutomationPeer implementations for the Silverlight automation infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
AutomationPeer | The class-specific AutomationPeer subclass to return. |
Overrides
| Improve this Doc View SourceOnGotFocus(RoutedEventArgs)
Called before the GotFocus event occurs.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
RoutedEventArgs | e | The data for the event. |
Overrides
| Improve this Doc View SourceOnLostFocus(RoutedEventArgs)
Called before the LostFocus event occurs.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
RoutedEventArgs | e | The data for the event. |
Overrides
| Improve this Doc View SourceOnLostMouseCapture(MouseEventArgs)
Called before the LostMouseCapture event occurs to provide handling for the event in a derived class without attaching a delegate.
Declaration
protected override void OnLostMouseCapture(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | A MouseEventArgs that contains the event data. |
Overrides
| Improve this Doc View SourceOnMouseEnter(MouseEventArgs)
Raises the PointerEntered event
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e |
Overrides
| Improve this Doc View SourceOnMouseLeave(MouseEventArgs)
Raises the PointerExited event
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e |
Overrides
| Improve this Doc View SourceOnMouseLeftButtonDown(MouseButtonEventArgs)
Raises the PointerPressed event
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e |
Overrides
| Improve this Doc View SourceOnMouseLeftButtonUp(MouseButtonEventArgs)
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e |
Overrides
| Improve this Doc View SourceOnMouseMove(MouseEventArgs)
Raises the PointerMoved event
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e |
Overrides
Events
| Improve this Doc View SourceDragCompleted
Occurs when the Thumb control loses mouse capture.
Declaration
public event DragCompletedEventHandler DragCompleted
Event Type
Type | Description |
---|---|
DragCompletedEventHandler |
DragDelta
Occurs one or more times as the mouse pointer is moved when a Thumb control has logical focus and mouse capture.
Declaration
public event DragDeltaEventHandler DragDelta
Event Type
Type | Description |
---|---|
DragDeltaEventHandler |
DragStarted
Occurs when a Thumb control receives logical focus and mouse capture.
Declaration
public event DragStartedEventHandler DragStarted
Event Type
Type | Description |
---|---|
DragStartedEventHandler |