using System; using System.Windows; namespace GongSolutions.Wpf.DragDrop { /// /// Interface implemented by Drag Handlers. /// public interface IDragSource { /// /// Queries whether a drag can be started. /// /// /// /// Information about the drag. /// /// /// /// To allow a drag to be started, the property on /// should be set to a value other than . /// void StartDrag(IDragInfo dragInfo); /// /// With this action it's possible to check if the drag/drop operation is allowed to start /// e.g. check for a UIElement inside a list view item, that should not start a drag/drop operation /// bool CanStartDrag(IDragInfo dragInfo); /// /// Notifies the drag handler that a drop has occurred. /// /// /// /// Information about the drop. /// void Dropped(IDropInfo dropInfo); /// /// Notifies the drag handler that a drag and drop operation has finished. /// /// The operation result. /// The drag information. void DragDropOperationFinished(DragDropEffects operationResult, IDragInfo dragInfo); /// /// Notifies the drag handler that a drag has been aborted. /// void DragCancelled(); /// /// Notifies that an exception has occurred upon dragging. /// /// /// The exception that occurrred. /// /// /// Boolean indicating whether the exception is handled in the drag handler. /// False will rethrow the exception. /// bool TryCatchOccurredException(Exception exception); } }