Drop file into WPF window
I have code to delete a file in a WPF window:
XAML (at Home.xaml):
Drop="HomeWindow_Drop" AllowDrop="True"> C # (in Home.xaml.cs)
private void HomeWindow_Drop(object sender, DragEventArgs e) { // Handle this } But when I try to drag the file into the Home Window, I get the โinaccessibleโ cursor window (a circle with a line, although it is), and the event does not fire. I have no idea why this is being done.
I have never had this problem in Windows 7, and now I am in Windows 8, but I donโt think that would have anything to do with it?
Is an event happening or is there nothing that is happening? If the event ends, I think there is another event that you should use to report that it starts, and then change the cursor.
Rather, look at DragEnter, DragLeave, and DragOver . Just change the cursor on these events.