public DragDropEffects Drop(IDropQuery info)
 {
     if (!info.Item.GetDataPresent(typeof(string)))
     {
         return(DragDropEffects.None);
     }
     info.AdornTarget(DropAdornerKind.Rectangle);
     DropAreaText = $"{info.GetTargetLocation()} ==> {info.GetRelativeTargetLocation()}";
     return(DragDropEffects.All);
 }
Exemple #2
0
 public static void AdornLeftRightMiddle(this IDropQuery query) => query.AdornTarget(
     Select3Way(query.GetRelativeTargetLocation().X, DropAdornerKind.Left, DropAdornerKind.Right));
Exemple #3
0
 public static void AdornTopBottom(this IDropQuery query) =>
 query.AdornTarget(query.GetRelativeTargetLocation().Y < 0.5 ? DropAdornerKind.Top : DropAdornerKind.Bottom);
Exemple #4
0
 public static void AdornTopBottomMiddle(this IDropQuery query) => query.AdornTarget(
     Select3Way(query.GetRelativeTargetLocation().Y, DropAdornerKind.Top, DropAdornerKind.Bottom));
Exemple #5
0
 public static void AdornLeftRight(this IDropQuery query) =>
 query.AdornTarget(query.GetRelativeTargetLocation().X < 0.5 ? DropAdornerKind.Left : DropAdornerKind.Right);