xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] Cannot drag Button or ImageButton on UWP #12303

Open davidortinau opened 4 years ago

davidortinau commented 4 years ago

Description

This works on iOS, but on UWP I don't get any of the drag gesture features to work.

https://github.com/davidortinau/draganddropsample

Basic Information

PureWeen commented 4 years ago

It doesn't look like Drag is supported natively on UWP. If you test on a native app and set "CanDrag" to true then nothing happens, so we'll have to just go with "by design" or hack together a fake implementation on UWP

The PanGesture also doesn't work on UWP buttons

hawkerm commented 3 years ago

Is there a corresponding bug tracking this on the WinUI repo?

MichaelBakker commented 1 year ago

In Both UWP and WinUI setting Button.ClickMode to "Press" enables DragStarted event, Pressed event and Command execution.