diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_UIElement.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_UIElement.cs index 4b77dae833af..43f65b9b3c49 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_UIElement.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_UIElement.cs @@ -33,7 +33,6 @@ using Windows.UI; using Windows.ApplicationModel.Appointments; using Microsoft.UI.Xaml.Hosting; -using Uno.UI.Helpers.Xaml; using Uno.UI.Toolkit.Extensions; #if __IOS__ @@ -1718,16 +1717,15 @@ public async Task When_DragDrop_AcceptedOperation_None(bool setAcceptedOperation Height = 100, Fill = new SolidColorBrush(Microsoft.UI.Colors.LightCoral), AllowDrop = true - }.GenericApply(rect => - { - rect.Drop += (_, _) => dropCount++; - if (setAcceptedOperation) - { - rect.DragOver += (_, e) => e.AcceptedOperation = DataPackageOperation.Copy; - } - })) + }) }; + target.Drop += (_, _) => dropCount++; + if (setAcceptedOperation) + { + target.DragOver += (_, e) => e.AcceptedOperation = DataPackageOperation.Copy; + } + await UITestHelper.Load(sp); mouse.MoveTo(source.GetAbsoluteBoundsRect().GetCenter()); diff --git a/src/Uno.UI/UI/Xaml/DragDrop/DragDropExtension.macOS.cs b/src/Uno.UI/UI/Xaml/DragDrop/DragDropExtension.macOS.cs index 2df02c5da926..2b1b60f4c6e1 100644 --- a/src/Uno.UI/UI/Xaml/DragDrop/DragDropExtension.macOS.cs +++ b/src/Uno.UI/UI/Xaml/DragDrop/DragDropExtension.macOS.cs @@ -67,7 +67,7 @@ private void OnDraggingExited(NSDraggingInfo draggingInfo) private bool OnPerformDragOperation(NSDraggingInfo draggingInfo) { - var operation = _manager.ProcessDropped(new DragEventSource(_fakePointerId, draggingInfo, _window)); + var operation = _manager.ProcessReleased(new DragEventSource(_fakePointerId, draggingInfo, _window)); return (operation != DataPackageOperation.None); } @@ -88,7 +88,7 @@ public void StartNativeDrag(CoreDragInfo info) (NSImage image, CGPoint screenPoint, NSDragOperation operation) => { // The drop was completed externally - _manager.ProcessDropped(new DragEventSource(info.SourceId, _window)); + _manager.ProcessReleased(new DragEventSource(info.SourceId, _window)); return; };