void StartDrag() { if (Recognizer is DragGestureRecognizer dragGestureRecognizer && dragGestureRecognizer.CanDrag) { if (Renderer == null) { return; } var arg = dragGestureRecognizer.SendDragStarting(Renderer.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(NativeView, target, strData, DragDropExtensions.DragDropActionType.Move, _iconCallback, null, null, _dragDoneCallback); } }
public void ResetCurrentStateData() { s_currentDragStateData = null; }