Drag & Drop from a FlowDocument

G

Guest

I am working on a feature to drag images into a flowdocument, and need the
ability to drag them out of the document, or drag them around in the
container panel to allow for easy reordering of the images within the
document.

I have created a DragDropManager to handle this action, and can drag the
image into the Flowdocument (targeting a WrapPanel that is contained in a
BlockUIContainer) without issue. However, when I drag the image back out it
appears that the flowdocument is interpreting this action as an attempt to
highlight the WrapPanel and is impacting the event firing of the WrapPanel
which causes DragDrop manager (handling the drag and drop events for the
WrapPanel) to be unaware of the user's actions. If I highlight the WrapPanel
and then drag the image everything works fine.

Curious on the best workaround for this issue? Is there a way to deactivate
the highlighting functionality of the flowdocument, or does anyone have a
different direction that I might try?
 
G

Guest

I figured it out! I forgot to set the event handled state to true in the
WrapPanel event handler. By doing so the FlowDocument doesn't handle the
event and the drapdrop functionality works as desired.

Thanks,

twollman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top