picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.57k stars 325 forks source link

[WPF] Drag and drop image doesn't work #933

Open SlowLogicBoy opened 6 years ago

SlowLogicBoy commented 6 years ago

Expected Behavior

e.Data.Image != null or at least e.Data.GetData("PNG") != null;

Actual Behavior

Oposite of Expected.

Steps to Reproduce the Problem

  1. Drag and drop image from outlook.

Code that Demonstrates the Problem

I used RoslynPad for this.

#r "$NuGet\Eto.Forms\2.4.0-build1189\lib\net45\Eto.dll"
#r "$NuGet\Eto.Platform.Wpf\2.4.0-build1189\lib\net45\Eto.Wpf.dll"
using Eto.Forms;

var app = new Application(new Eto.Wpf.Platform());
var form = new Form
{
    Title = "Hello?",
    AllowDrop = true,
};
form.DragDrop += (s, e) =>
{
    e.Dump();
    foreach (var type in e.Data.Types)
    {
        try
        {
             e.Data.GetData(type).Dump(type);
        }
        catch (Exception ex)
        {
            ex.Dump(type);
        }
    }
};
app.Run(form);

Specifications

cwensley commented 6 years ago

Thanks for the report and helping with testing this! I'll take a look.