// when entering the window
        public void OnDragEnter(object sender, ExtendedDragEventHandlerArgs e)
        {
            if (e.Current != null)
            _enterElement = new KeyValuePair<HtmlDocumentHandle, HtmlElementData> (e.Document, e.Current);
              _elementUnderCursor = _enterElement;

              var args = new DragDropEventData();
              args.Names = GetFileNames (e.Data);

              if (DragEnter != null)
            DragEnter (this, c_dragEnterEventName, args);
        }
        public void OnDragDrop(object sender, ExtendedDragEventHandlerArgs e)
        {
            var current = e.Current;
              e.Droppable = IsDroppable (current);

              if (DragDrop != null && e.Droppable)
              {
            var paths = GetFileNames (e.Data);
            var resources = paths.Select (
            p => (File.GetAttributes (p) & FileAttributes.Directory) == FileAttributes.Directory
                     ? new DirectoryInfo (p) as FileSystemInfo
                     : new FileInfo (p) as FileSystemInfo
            ).ToArray();

            var handles = ResourceManager.AddResources (resources);

            var args = new DragDropEventData
                   {
                       ResourceHandles = handles.Select (r => r.ToString()).ToArray(),
                       Names = paths
                   };

            DragDrop (this, c_dragDropEventName, args);
              }
        }