I have a application, in which user can drag & drop files from any folder and also can d&d emails or email attachments from outlook application.
When drag event fires, I will operate with DragEventArgs
, where args.Data is a (System.Windows) DataObject
(our dragged object).
To simplify the task, we can drag only one file.
I do not need to determine the place where the d&d occurred, I should prohibit d&d files that are not .msg or .eml formats.
Remark: If user d&d a file from any folder I will get the file path through:
args.Data.GetData(DataFormats.FileDrop)
But when user d&d any data from outlook, that can be attachment or the whole email
args.Data.GetData(DataFormats.FileDrop) is null
Thanks for help!