Looking to capture Drag and Drop

Docking/MDI for WPF Forum

Posted 11 years ago by Michael Hays - Owner, Spiral LLC
Avatar
I have a list box control and I would like to drag a Toolbar (or some other dockable) over that list box. The intent is to then capture an image brush off the current visual brush for that control and save it as a "bookmark" into the list control. I'm not receiving Drag events or PreviewDrag events.

Optimally, I'd like to be able to drag a toolbar off the list box and prepare it so that it can be dropped anywhere a properly initialized toolbar could be dropped (In my case, they will all share a common DockSite).

Is there any supported way to do this? Is not, is there some caveat if I want to slog around in the visual tree? My current thought was to make my own template for the ToolWindowContainer and translate changes to the children collection to events to which the ListBox could respond.

Any help would be appreciated.

[Modified at 09/30/2008 11:16 AM]

[Modified at 09/30/2008 12:13 PM]

Comments (3)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Michael,

Just to clarify, by "toolbar" do you mean "tool window" instead?


Actipro Software Support

Posted 11 years ago by Michael Hays - Owner, Spiral LLC
Avatar
I apologize. Yes -- I meant Tool Window.
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Michael,

Hmm, could you perhaps attach to the DockSite.WindowDragging/WindowDragged events to know when something is being dragged? When WindowDragging occurs, the DockSite will typically have mouse capture. The problem is that you can't tell which window(s) are being dragged right now.

Even if you did get a window reference, there could be multiple windows being dragged like if you drag a tool window container or a rafting window containing multiple tool windows. Wouldn't that cause some issues for what you are trying to do?


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.