C# Class Yuhan.WPF.DragDrop.DragDropFramework.DragManager

Manage drag events for IDataProviders
Datei anzeigen Open project: hansuky/Yuhan Class Usage Examples

Public Methods

Method Description
DragManager ( FrameworkElement dragSource, IDataProvider dragDropObject ) : System

Manage dragging data object from dragSource FrameworkElement. Hook various PreviewMouse* events in order to determine when a drag starts.

Private Methods

Method Description
DoDragDrop_Done ( DragDropEffects resultEffects ) : void

Called after DragDrop.DoDragDrop() returns. Typically during a file move, for example, the file is deleted here. However, when moving a TabItem from one TabControl to another the source TabItem must be unparented from the source TabControl before it can be added to the destination TabControl. So most of the time when moving items between item controls, this method isn't used.

DoDragDrop_Start ( System.Windows.Input.MouseEventArgs e ) : DragDropEffects

Prepare for and begin a drag operation. Hook the events needed by the data provider.

DragSource_GiveFeedback ( object sender, System.Windows.GiveFeedbackEventArgs e ) : void

Display the appropriate drag cursor based on DragDropEffects returned within the DropManager

DragSource_PreviewMouseLeftButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Check for a supported SourceContainer/SourceObject. If found, get ready for a possible drag operation.

DragSource_PreviewMouseLeftButtonUp ( object sender, System e ) : void

When MouseLeftButtonUp event occurs, abandon any drag operation that may be in progress

DragSource_PreviewMouseMove ( object sender, System.Windows.Input.MouseEventArgs e ) : void

If the mouse is moved (dragged) a minimum distance over a supported SourceContainer/SourceObject, initiate a drag operation.

DragSource_QueryContinueDrag ( object sender, System.Windows.QueryContinueDragEventArgs e ) : void

Gather keyboard key state information and optionally abort a drag operation

Method Details

DragManager() public method

Manage dragging data object from dragSource FrameworkElement. Hook various PreviewMouse* events in order to determine when a drag starts.
public DragManager ( FrameworkElement dragSource, IDataProvider dragDropObject ) : System
dragSource System.Windows.FrameworkElement The FrameworkElement which contains objects to be dragged
dragDropObject IDataProvider Object to be dragged, implementing IDataProvider
return System