Open Tenjim opened 6 months ago
did you mark the thread as [STAThread]?
[STAThread]
public static void Main(string[] args)
...
HI @timunie , yes I did it on my main method
Can you do us a favor and test vanilla Avalonia Drag & Drop? I have no mac, so can't do it on my own. If you can reproduce there, upload the sample please
Hi I'll close this ticket, with investigation, it's came to DragAndDrop from Avalonia Xaml Behaviour. I'll follow up on his side. It's work well with vanilla Drag and drop
Describe the bug
After Investigation, I have issue when we drag a file from Finder and drop on Avalonia App. I'm using DragAndDrop Behavior from this repo. I have notice that when we do an DragEnter, we are looking to get a DataObject and there is en exception on Avalonia native clipboard:
System.Runtime.InteropServices.COMException (0x80004005): GetBytes failed at Avalonia.Native.Interop.Impl.__MicroComIAvnClipboardProxy.GetBytes(String type) at Avalonia.Native.ClipboardImpl.GetDataAsync(String format) at Avalonia.Native.ClipboardDataObject.Get(String dataFormat) at Avalonia.Xaml.Interactions.DragAndDrop.ContextDropBehavior.DragEnter(Object sender, DragEventArgs e)
To Reproduce
Using DragAndDrop Behaviour, use it on an listbox. Drag one file from Finder App to listboxItem.
Expected behavior
doing drop behavior
Avalonia version
11.0.10
OS
macOS
Additional context
No response