Skip to end of metadata
Go to start of metadata

Remarks

The UXThumb control can be included in another control, such as a UXSliderBar or UXClock control, to let the user change the control's value.

UXThumb provides DragStartedDragCompleted and DragDelta events to manage drag operations associated with the mouse pointer. When the user presses the left mouse button, the UXThumb control receives logical focus and mouse capture, and the DragStarted event is raised. While the UXThumb control has focus and mouse capture, the DragDelta event can be raised multiple times without limit. When the user releases the left mouse button, the UXThumb control loses mouse capture and the DragCompleted  event is raised.

The event information provides a change in position, but does not reposition the UXThumb. You must manually change or reposition the UXThumb or any other elements that you want to resize or change as a result of the drag operation. The UXThumb control does not provide drag-and-drop functionality.

Definition

public class UXThumb : ISControl

Summary

The following table summarizes the members exposed in this class.

Public Constructors

UXThumb Constructor()Initializes a new instance of the UXThumb class.

Public Properties

CornerRadiusRepresents the radius of a border's corner. The radius can't be negative.
IsControlFocusedGets or sets a value that indicates whether the control has focus.
IsDraggingGets or sets a value that indicates whether the control is currently being dragged.
UseVisualStateGets or sets a value that indicates whether the control should apply visual state during user interaction.

Protected Properties

ProductProduct Info.

Fields

CornerRadiusPropertyIdentifies the CornerRadius dependency property.
DragCompletedEventIdentifies the DragCompleted routed event.
DragDeltaEventIdentifies the DragDelta routed event.
DragStartedEventIdentifies the DragStarted routed event.
IsControlFocusedPropertyIdentifies the IsControlFocused dependency property.
IsDraggingPropertyIdentifies the IsDragging dependency property.
UseVisualStatePropertyIdentifies the UseVisualState dependency property.

Public Methods

CancelDrag()Cancels a drag operation for the UXThumb.
OnApplyTemplate()Builds the visual tree for the UXThumb when a new template is applied.

Protected Methods

OnCornerRadiusChanged()Occurs when corner radius property changes.
OnGotFocus(RoutedEventArgs)Called before the GotFocus event occurs.
OnLostFocus(RoutedEventArgs)Called before the LostFocus event occurs.
OnLostMouseCapture(MouseEventArgs)Called before the LostMouseCapture event occurs.
OnMouseEnter(MouseEventArgs)Called before the MouseEnter event occurs.
OnMouseLeave(MouseEventArgs)Called before the MouseLeave event occurs.
OnMouseLeftButtonDown(MouseButtonEventArgs)Called before the MouseLeftButtonDown event occurs.
OnMouseLeftButtonUp(MouseButtonEventArgs)Called before the MouseLeftButtonUp event occurs.
OnMouseMove(MouseEventArgs)Called before the MouseMove event occurs.

Events

DragCompletedOccurs when the Thumb control loses mouse capture.
DragDeltaOccurs one or more times as the mouse changes position when a Thumb control has logical focus and mouse capture.
DragStartedOccurs when a Thumb control receives logical focus and mouse capture.

Public Constructors

public UXThumb()

Initializes a new instance of the UXThumb class.

Public Properties

public CornerRadius CornerRadius { get; set; }

Represents the radius of a border's corner. The radius can't be negative.

public bool IsControlFocused { get; }

Gets or sets a value that indicates whether the control has focus.

public bool IsDragging { get; }

Gets or sets a value that indicates whether the control is currently being dragged.

public bool UseVisualState { get; set; }

Gets or sets a value that indicates whether the control should apply visual state during user interaction.

Protected Properties

protected ProductInfo Product { get; }

Product Info.

Fields

public static readonly DependencyProperty CornerRadiusProperty

Identifies the CornerRadius dependency property.

public static readonly RoutedEvent DragCompletedEvent

Identifies the DragCompleted routed event.

public static readonly RoutedEvent DragDeltaEvent

Identifies the DragDelta routed event.

public static readonly RoutedEvent DragStartedEvent

Identifies the DragStarted routed event.

public static readonly DependencyProperty IsControlFocusedProperty

Identifies the IsControlFocused dependency property.

public static readonly DependencyProperty IsDraggingProperty

Identifies the IsDragging dependency property.

public static readonly DependencyProperty UseVisualStateProperty

Identifies the UseVisualState dependency property.

Public Methods

public void CancelDrag()

Cancels a drag operation for the UXThumb.

public void OnApplyTemplate()

Builds the visual tree for the UXThumb when a new template is applied.

Protected Methods

protected void OnCornerRadiusChanged()

Occurs when corner radius property changes.

protected void OnGotFocus(RoutedEventArgs e)

Called before the GotFocus event occurs.

Parameters

eThe data for the event.

 

protected void OnLostFocus(RoutedEventArgs e)

Called before the LostFocus event occurs.

Parameters

eThe data for the event.

 

protected void OnLostMouseCapture(MouseEventArgs e)

Called before the LostMouseCapture event occurs.

Parameters

eThe data for the event.

 

protected void OnMouseEnter(MouseEventArgs e)

Called before the MouseEnter event occurs.

Parameters

eThe data for the event.

 

protected void OnMouseLeave(MouseEventArgs e)

Called before the MouseLeave event occurs.

Parameters

eThe data for the event.

 

protected void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Called before the MouseLeftButtonDown event occurs.

Parameters

eThe data for the event.

 

protected void OnMouseLeftButtonUp(MouseButtonEventArgs e)

Called before the MouseLeftButtonUp event occurs.

Parameters

eThe data for the event.

 

protected void OnMouseMove(MouseEventArgs e)

Called before the MouseMove event occurs.

Parameters

eThe data for the event.

 

Events

public event DragCompletedEventHandler DragCompleted

Occurs when the Thumb control loses mouse capture.

public event DragDeltaEventHandler DragDelta

Occurs one or more times as the mouse changes position when a Thumb control has logical focus and mouse capture.

public event DragStartedEventHandler DragStarted

Occurs when a Thumb control receives logical focus and mouse capture.

  • No labels