Using the Drag-and-Drop Framework

Using the Microsoft Surface Drag-and-Drop Framework

Surface 1.0 SP1

The Microsoft Surface drag-and-drop framework enables you to include drag-and-drop operations in your Microsoft Surface applications. The framework includes several classes.

 

Class Description

SurfaceDragDrop

Provides static properties and methods to perform drag-and-drop operations. This class defines the attached events that you can use to listen for drag-and-drop operations, and it includes methods to:

  • Add or remove attached event handlers to listen for drag-and-drop events.

  • Begin a drag-and-drop operation.

  • End (or cancel) a drag-and-drop operation.

  • Get a list of cursors (SurfaceDragCursor objects) that are targeting an element, or all cursors for the application window.

SurfaceDragCursor

Represents the element (and associated data) that is being dragged. This class includes a visual representation of the cursor that you define.

QueryTargetEventArgs

Represents event arguments for an attached event that the QueryTargetEvent field identifies. This event is raised on each element that can accept a dropped item.

TargetChangedEventArgs

Represents event arguments for an attached event that the TargetChangedEvent field identifies. This event is raised as the potential drop target changes.

GiveFeedbackEventArgs

Represents event arguments for an attached event that the GiveFeedbackEvent field identifies. This event is raised when a drag operation starts and during the drag movement.

SurfaceDragDropEventArgs

Represents event arguments that are used for drag-and-drop events.

SurfaceDragCompletedEventArgs

Represents event arguments for an attached event that the DragCompletedEvent field identifies. This event is raised on the drag source object when the drag operation is complete.

The following Microsoft Surface controls include built-in drag-and-drop functionality:

For other controls, you can use the Microsoft Surface drag-and-drop framework to implement drag-and-drop functionality in your applications.

The following topics describe how to use the drag-and-drop framework to enable common drag-and-drop scenarios:

Community Additions

ADD
Show:
© 2016 Microsoft