protected override bool OnDragMotion(DragContext context, int x, int y, uint time_) { DragDropJudedArgs args = new DragDropJudedArgs() { DragContext = context }; OnOnDragMotionJudgedHandle(args); if (!args.Handle) { var dragwidget = context.GetSourceWidget(); if (dragwidget != null) { var dragData = context.GetDragData() as DragData; //内部拖拽 if (dragData != null) { return(base.OnDragMotion(context, x, y, time_)); } else { return(false); } } else { //此时拖拽为外部拖拽 return(true); } } else { if (args.AllDrop) { return(base.OnDragMotion(context, x, y, time_)); } else { return(false); } } }
private static bool IsSameSourceWidget(DragContext dragContext) { return(DragDataManager.sourceWidget != null && DragDataManager.sourceWidget.Equals((object)dragContext.GetSourceWidget())); }
public static void SetDragData(DragContext dragContext, object data) { DragDataManager.data = data; DragDataManager.sourceWidget = dragContext.GetSourceWidget(); }