IXRThumb (Compact 2013)

3/28/2014

This class represents a control that can be dragged by the user.

Syntax

class IXRThumb : public IXRControl

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRThumb

Methods

Method

Description

IXRThumb::AddDragCompletedHandler

Attaches a delegate to the DragCompleted event for this control. When the DragCompleted event is raised by this control, this delegate will be invoked.

IXRThumb::AddDragDeltaHandler

Attaches a delegate to the DragDelta event for this control. When the DragDelta event is raised by this control, this delegate will be invoked.

IXRThumb::AddDragStartedHandler

Attaches a delegate to the DragStarted event for this control. When the DragStarted event is raised by this control, this delegate will be invoked.

IXRThumb::GetIsDragging

Retrieves a value that indicates whether this thumb control has the focus and mouse capture.

IXRThumb::GetIsFocused

Retrieves a value that indicates whether this thumb control has the focus.

IXRThumb::RemoveDragCompletedHandler

Removes a delegate from the DragCompleted event for this control.

IXRThumb::RemoveDragDeltaHandler

Removes a delegate from the DragDelta event for this control.

IXRThumb::RemoveDragStartedHandler

Removes a delegate from the DragStarted event for this control.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

The IXRThumb control is usually included in another control, such as an IXRScrollBar or IXRSlider control, to let the user change the Value of the control. The IXRThumb control can also be used to resize controls. For example, an IXRThumb control in the corner of a window can provide a location for the user to click with the mouse, in order to start a resize operation.

IXRThumb provides DragStarted, DragCompleted, and DragDelta events to manage drag operations associated with the mouse pointer or stylus. The IXRThumb control receives logical focus and mouse capture when the user presses the left mouse button while the mouse pointer is paused over the IXRThumb. When the thumb control receives logical focus and mouse capture, the DragStarted event is raised. While the IXRThumb control has logical focus and mouse capture, the DragDelta event can be raised repeatedly. When the user releases the left mouse button or stylus, the IXRThumb control loses mouse capture and the DragCompleted event is raised.

You can add custom event handlers to the DragStarted, DragCompleted, and DragDelta events by using the methods that are provided in this class.

When you create a class instance, use an IXRThumbPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can also define a thumb control in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the Thumb Class on MSDN.

.NET Framework Equivalent

System.Windows.Controls.Primitives.Thumb

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management
IXRSlider
IXRScrollBar