Page 1 of 1

Drag and Drop event in wpf application

Posted: 06 Nov 2019 07:22
by s.rehmanali
Hi, I have used AxInterop.AXVLC and Interop.AXVLC in my wpf application. Everything is working fine but the drag and drop is not working.

What I have done:
I have created a WindowsFormsHost on the xaml and added the vlc player as the child component. the code is below; I have also enabled the AllowDrop to true for the main window.

Code: Select all

public partial class MainWindow : System.Windows.Window { readonly AxVLCPlugin2 _vlcPlugin; public MainWindow() { InitializeComponent(); _vlcPlugin = new AxVLCPlugin2() { Name = "p1"}; player1.Child = _vlcPlugin; } }
Now when I'm trying to trigger the Drop event it is not triggering.

My questions:
1. Is there any existing drag and drop event which I can use? so user can directly play the video file by dragging into my WindowsFormsHost area.
2. If not, How can I create one or how can I extend the any existing class?