void StartDrag() { if (Recognizer is DragGestureRecognizer dragGestureRecognizer && dragGestureRecognizer.CanDrag) { if (Handler == null) { return; } var arg = dragGestureRecognizer.SendDragStarting(Element); if (arg.Cancel) { return; } s_currentDragStateData = new CustomDragStateData(); s_currentDragStateData.DataPackage = arg.Data; var target = DragDropExtensions.DragDropContentType.Text; var strData = string.IsNullOrEmpty(arg.Data.Text) ? " " : arg.Data.Text; s_isDragging = true; DragDropExtensions.StartDrag(PlatformView, target, strData, DragDropExtensions.DragDropActionType.Move, _iconCallback, null, null, _dragDoneCallback); } }
public void AddDropGesture() { if (Handler == null) { return; } var target = DragDropExtensions.DragDropContentType.Targets; DragDropExtensions.AddDropTarget(PlatformView, target, _dragEnterCallback, _dragLeaveCallback, null, _dropCallback); }