Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Move group of nodes in diagram (Read 1874 times)
Necroman
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 49
Joined: Jul 27th, 2009
Move group of nodes in diagram
Apr 20th, 2010 at 12:36pm
Print Post  
Hi, I've got a question. If I have selected group of nodes and related links in diagram and I want to move such nodes and links to another place in diagram, all that in code, how to do that? Moving nodes is simple by changing its position, but when I move the nodes, the middle points of links are not moved with it. Also if I try to move those link joins by a delta value in code, the links get screwed. I use polyline links, not cascaded.
Thanks for help
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Move group of nodes in diagram
Reply #1 - Apr 20th, 2010 at 12:56pm
Print Post  
Hi,

Try using the MoveSelection method from this post:
http://mindfusion.eu/Forum/YaBB.pl?board=wpfdg_disc;action=display;num=122710007...

You'll have to change the Point variables to PointF.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Necroman
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 49
Joined: Jul 27th, 2009
Re: Move group of nodes in diagram
Reply #2 - Apr 20th, 2010 at 3:26pm
Print Post  
Thanks, that works, somehow.

But another rather theoretical question, why DiagramNodeCollection does not implement IEnumerable<DiagramNode> ??? The same question is also for DiagramLinkCollection.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Move group of nodes in diagram
Reply #3 - Apr 20th, 2010 at 5:34pm
Print Post  
Because they are not generic collections, just old fashioned CollectionBase-derived classes, so they support the non-generic IEnumerable. We've never seen a reason to change them to generic classes after .NET 2 introduced them I guess.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint