예제 #1
0
        private NSDragOperation OnDraggingEnteredEvent(NSDraggingInfo draggingInfo)
        {
            var source            = new DragEventSource(_fakePointerId, draggingInfo, _window);
            var data              = DataPackage.CreateFromNativeDragDropData(draggingInfo);
            var allowedOperations = DataPackageOperation.Copy;             // Should match with return value
            var info              = new CoreDragInfo(source, data, allowedOperations);

            CoreDragDropManager.GetForCurrentView()?.DragStarted(info);

            // Note: No need to _manager.ProcessMove, the DragStarted will actually have the same effect

            // To allow the macOS drag to continue, we must assume drop is supported here.
            // This will immediately be updated within the OnDraggingUpdated method.
            return(NSDragOperation.Copy);
        }