Drawing Control and IsDropSource/Target behavior

T

Tony Burke

I have configured two master shapes to enable shape “add on drop†behavior
(using IsDropSource/Target cells in the shapesheet). In Visio 2003 when
dragging the source master from the stencil to the drawing area over the
target shape the black boundary box appears like expected allowing me to drop
onto the shape.

I want to reproduce that behavior in my application hosting the Visio
Drawing Control. I have created my own stencil form to mimic the Visio
stencil window. I am using the OLE drag and drop functionality to drag the
masters onto the drawing canvas via DoDragDrop(dragMaster,
DragDropEffects.Copy) to initiate the drag operation. This works perfectly
for dragging shapes onto the drawing control except it does not enable the
black boundary box when the IsDropSource master is dragged over the
IsDropTarget shape.

Although, once the IsDropSource shape has been dropped onto the canvas, I
can then drag it over the IsDropTarget shape and the box appears allowing me
to drop the shape into the group. Is there something I am missing that would
enable the “add on drop†behavior without having to drop the shape on the
canvas first?

Thank you,

-Tony
 

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