Ã
Ã…ke
The scenario is the following:
I have a tree which I drag shapes from. When dragging the item, i find its
corresponding master in the document stencil (via doc.Masters.get_ItemU) and
DoDragDrop(foundMaster, DragDropEffects.Copy) on the master shape I get.
After doing this a couple of times (and it works as it should) i edit (in
visio) the master shape in the document stencil. After updating all
references i try dragging another one in from my tree. The dragged object
looks fine, but when releasing/dropping the shape on the drawing surface, the
text is renamed to what it was before, and another master is created in the
document stencil.
Why is this happening? My code find the correct master since the text is
correct when dragging the item without releasing it... But Visio does
something when i release it. I know that the UniqueID changes when editing
the text, but should this really be a problem?
If i edit the master in the document stencil before doing any drag-and-drop
operation, then drag-and-drop works (no change of text and no new master
shape), but immediately after editing the master, it starts acting weird!
Dragging the master from the document stencil works fine in every case.
Another thing:
I have also noticed that the icon when my drag-and-drop operation is going
on, is more like in windows explorer, but when using the document stencil
it's only a small 'plus' sign. What is the difference?.. How can I access
Visios internal drag-and-drop functionality?
I have a tree which I drag shapes from. When dragging the item, i find its
corresponding master in the document stencil (via doc.Masters.get_ItemU) and
DoDragDrop(foundMaster, DragDropEffects.Copy) on the master shape I get.
After doing this a couple of times (and it works as it should) i edit (in
visio) the master shape in the document stencil. After updating all
references i try dragging another one in from my tree. The dragged object
looks fine, but when releasing/dropping the shape on the drawing surface, the
text is renamed to what it was before, and another master is created in the
document stencil.
Why is this happening? My code find the correct master since the text is
correct when dragging the item without releasing it... But Visio does
something when i release it. I know that the UniqueID changes when editing
the text, but should this really be a problem?
If i edit the master in the document stencil before doing any drag-and-drop
operation, then drag-and-drop works (no change of text and no new master
shape), but immediately after editing the master, it starts acting weird!
Dragging the master from the document stencil works fine in every case.
Another thing:
I have also noticed that the icon when my drag-and-drop operation is going
on, is more like in windows explorer, but when using the document stencil
it's only a small 'plus' sign. What is the difference?.. How can I access
Visios internal drag-and-drop functionality?