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

Manage drop events for IDataConsumers
Mostra file Open project: hansuky/Yuhan Class Usage Examples

Public Methods

Method Description
DropManager ( FrameworkElement dropTarget, IDataConsumer dragDropConsumer ) : System

Manage data that is dragged over and dropped on the dropTarget. Supported data is defined as one or more classes that implement IDataConsumer.

Private Methods

Method Description
DropObjectFormat ( System.Windows.DragEventArgs e ) : string

Returns a string of the data formats contained in the drag data

DropTarget_DragEnter ( object sender, System.Windows.DragEventArgs e ) : void

Initial call, after DoDragDrop is called, has Effects and AllowedEffects set to allowedEffects as passed to DoDragDrop. Subsequent Effects and AllowedEffects are set to the Effects returned by DragLeave. Note that DragLeave can return effects that are not defined in allowedEffects (as passed to DoDragDrop). Source and Original source are set to dragSource as passed to DoDragDrop.

DropTarget_DragLeave ( object sender, System.Windows.DragEventArgs e ) : void

Retured effects are passed to *_DragEnter in both Effects and AllowedEffects; even effects not included in DoDragDrop's allowedEffects can be used.

DropTarget_DragOver ( object sender, System.Windows.DragEventArgs e ) : void

Occurs when mouse is over the area occupied by the dropTarget (specified in the constructor). You must likely will provide your own method; make sure to define DragOver in DataConsumerActions.

DropTarget_Drop ( object sender, System.Windows.DragEventArgs e ) : void

Occurs when the left mouse button is released in the area occupied by the dropTarget (specified in the constructor). You must likely will provide your own method; make sure to define Drop in DataConsumerActions. See DropTarget_DragEnter in DropManager for additional comments.

Method Details

DropManager() public method

Manage data that is dragged over and dropped on the dropTarget. Supported data is defined as one or more classes that implement IDataConsumer.
public DropManager ( FrameworkElement dropTarget, IDataConsumer dragDropConsumer ) : System
dropTarget System.Windows.FrameworkElement FrameworkElement monitored for drag events
dragDropConsumer IDataConsumer Supported data objects
return System