Initializes a new C1DragHelper.
Namespace:
C1.SilverlightAssembly: C1.Silverlight (in C1.Silverlight.dll)
Syntax
| C# |
|---|
public C1DragHelper( UIElement element, C1DragHelperMode mode = C1DragHelperMode.TranslateXY, double initialThreshold = 1, bool captureElementOnPointerPressed = true, bool handledEventsToo = false, bool useManipulationEvents = false ) |
| Visual Basic |
|---|
Public Sub New ( _ element As UIElement, _ Optional mode As C1DragHelperMode = C1DragHelperMode.TranslateXY, _ Optional initialThreshold As Double = 1, _ Optional captureElementOnPointerPressed As Boolean = True, _ Optional handledEventsToo As Boolean = False, _ Optional useManipulationEvents As Boolean = False _ ) |
Parameters
- element
- Type: System.Windows..::..UIElement
An UIElement on which the drag gesture will be listened.
- mode (Optional)
- Type: C1.Silverlight..::..C1DragHelperMode
Indicates the sort of drag to be listened. Combine inertia flag with other flags so that DragDelta events are raised after the manipulation finish. i.e. C1DragHelperMode.FreeDrag | C1DragHelperMode.Inertia
- initialThreshold (Optional)
- Type: System..::..Double
Specifies the number of pixels the gesture will have to pass in order to start.
- captureElementOnPointerPressed (Optional)
- Type: System..::..Boolean
Indicates whether the element will be captured in pointer pressed event (MouseLeftButtonDown in SL and WPF and PointerPressed in WinRT) or in the first pointer move event (MouseMove in SL and WPF and PointerMoved in WinRT).
RemarksCapturing the element on mouse down will cause Click, DoubleClick and MouseLeftButtonUp events not to be fired in sub-elements (nested elements in the visual tree), whereas capturing the element on the first mouse move can make it difficult for final users to drag small elements quickly.
- handledEventsToo (Optional)
- Type: System..::..Boolean
Indicates whether drag gestures will be listened despite mouse events were already handled. (It only applies to mouse gestures)
- useManipulationEvents (Optional)
- Type: System..::..Boolean
When set to true it uses Manipulation events to listen to the gesture, otherwise itwill use Pointer events.