Beispiel #1
0
        public static IDragDropOperation GetRunningOperation(DependencyObject element)
        {
            IDragDropOperation operation = null;

            if (element != null)
            {
                operation = element.GetValue(DragDrop.dragDropOperationProperty) as IDragDropOperation;
            }

            return(operation);
        }
Beispiel #2
0
 private static void RemoveOperation(IDragDropOperation dragDropOperation)
 {
     (dragDropOperation.Source as DependencyObject).ClearValue(DragDrop.dragDropOperationProperty);
 }
Beispiel #3
0
 // exposed for testing
 internal static void AddOperation(IDragDropOperation dragDropOperation)
 {
     (dragDropOperation.Source as DependencyObject).SetValue(DragDrop.dragDropOperationProperty, dragDropOperation);
 }
Beispiel #4
0
 internal static void OnOperationFinished(IDragDropOperation dragDropOperation)
 {
     RemoveOperation(dragDropOperation);
 }
Beispiel #5
0
 public DragCompleteContext(object data, IDragDropOperation owner, bool dragSuccessful)
     : base(data, owner)
 {
     this.DragSuccessful = dragSuccessful;
 }
Beispiel #6
0
 public DragContext(object data, IDragDropOperation owner)
 {
     this.PayloadData = data;
     this.owner       = owner;
 }