/* * private CustomPopupPlacement[] HandlePopupPlacement(Size popupsize, Size targetsize, Point offset) * { * Point Position = this.dragLocation; * Position.Offset(offset.X, offset.Y); * return new[] { new CustomPopupPlacement(Position, PopupPrimaryAxis.None), }; * }*/ private void DragEnter(object sender, DragEventArgs e) { DragDropEffects Effect = this.GetDropEffect(e.AllowedEffects, e.KeyStates, e.Data); this.HandleDragStart(DragDropTargetAdapter.ToDropEffect(Effect)); this.HandleDragUpdate(DragDropTargetAdapter.ToDropEffect(Effect), new DragPosition(e)); e.Effects = Effect; e.Handled = true; }
private void Drop(object sender, DragEventArgs e) { e.Effects = this.GetDropEffect(e.AllowedEffects, e.KeyStates, e.Data); DragDropEffects DropEffects = this.GetDropEffect(e.Effects, e.KeyStates, e.Data); this.targetHandler.DoDrop(e.Data, DragDropTargetAdapter.ToDropEffect(DropEffects), this.dragTargetHandler.GetAdditionalDropInfo(new DragPosition(e))); e.Handled = true; this.HandleDragEnd(); }
private void DragOver(object sender, DragEventArgs e) { DragDropEffects Effect = this.GetDropEffect(e.AllowedEffects, e.KeyStates, e.Data); e.Effects = Effect; e.Handled = true; this.HandleDragUpdate(DragDropTargetAdapter.ToDropEffect(Effect), new DragPosition(e)); /*Window Window = Window.GetWindow(this.target); * this.dragLocation = Window.PointToScreen(e.GetPosition(Window)); * this.popup.PrivateMembers().Call("Reposition");*/ }