Пример #1
0
 public static void DoDragDrop(DependencyObject dragSource, object data, CustomDragDropEffects allowedEffects, CustomDragDropKeyStates initialKeyState)
 {
     _dragOperationInProgress = new CustomDragOperation(dragSource, data, allowedEffects, initialKeyState);
     _dragOperationInProgress.Subscribe<CustomDragDropEffects>(delegate (CustomDragDropEffects effects) {
         CustomDragDropCompletedEventArgs args = new CustomDragDropCompletedEventArgs {
             Effects = effects
         };
         OnDragCompleted(args);
     });
 }
Пример #2
0
 private static void OnDragCompleted(CustomDragDropCompletedEventArgs args)
 {
     _dragOperationInProgress.Dispose();
     _dragOperationInProgress = null;
     EventHandler<CustomDragDropCompletedEventArgs> dragDropCompleted = DragDropCompleted;
     if (dragDropCompleted != null)
     {
         dragDropCompleted(null, args);
     }
 }