Reputation: 125
I am trying to write a windows shell extension. My goal is to have a handler that can handle all drag and drop operations on a folder. When files are dropped on a folder, I want to execute my business logic which will either
I am using SharpShell as an easy way to implement the shell extension. It works, but not as i expected. It seems like the shell extension lets you handle the case of "what if a file is dropped on a FILE". Like, if i drop a PDF on a text file, I can intercept that. But DragEnter or Drop is never called when dragging (and dropping) files on a folder.
Is what I want to do supported without a namespace extension?
[ComVisible(true)]
[COMServerAssociation(AssociationType.AllFilesAndFolders)]
public class MyDropHandler : SharpDropHandler
{
protected override void DragEnter(DragEventArgs dragEventArgs)
{
dragEventArgs.Effect = DragDropEffects.Copy;
}
protected override void Drop(DragEventArgs dragEventArgs)
{
System.Diagnostics.Debugger.Launch();
}
}
Upvotes: 0
Views: 76