Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Dynamic Links (Read 6725 times)
Paul Eden
Full Member
***
Offline



Posts: 128
Joined: Aug 15th, 2007
Dynamic Links
Feb 4th, 2008 at 9:24am
Print Post  
Hi Stoyan

Was wondering if you could tell me what I'm doing wrong Smiley
As part of a routine, I have a node on a diagram created by instancing a UI control in code. From that I then create other controls in code and link them to the first via the attach to method. Because this does not generate a visual link I also create a link objects. When I then move the first node (again as part of the routine) for centering purposes via the Diagram.SetItemLeft method, the nodes origin points 'stick' to where the parent control was, rather than following it. I have set the dynamic property on the link objects to True, but this has not had any effect.

Any insight would be greatly aprieciated.


Many thanks


Paul
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dynamic Links
Reply #1 - Feb 4th, 2008 at 10:20am
Print Post  
Hi Paul,

For now use the DiagramNode.Move method to center the node, it seems to work. Our developer will examine why the attached property doesn't move the whole group.

Stoyan
  
Back to top
 
IP Logged
 
Paul Eden
Full Member
***
Offline



Posts: 128
Joined: Aug 15th, 2007
Re: Dynamic Links
Reply #2 - Feb 4th, 2008 at 12:02pm
Print Post  
Hi Stoyan

Thanks for that - the links now stay attached to the parent node.  As an off shoot of this, I was looking to only move the parent node.  When using the DiagramItem.Move method, it is as if the User has moved the node and as such the entire group moves.  When the Diagram.SetItemLeft is fixed, will it have the same result or do I need to set anything on the group to temporarily keep it in place?


Paul
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dynamic Links
Reply #3 - Feb 4th, 2008 at 12:43pm
Print Post  
Hi Paul,

Setting the ItemLeft attached property will have the same effect as calling Move. As a work-around, you can center the child items instead of the parent one, or center the parent before creating the groups.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Paul Eden
Full Member
***
Offline



Posts: 128
Joined: Aug 15th, 2007
Re: Dynamic Links
Reply #4 - Feb 4th, 2008 at 2:58pm
Print Post  
Ok, thanks for that - time to shunt some code around Smiley



Paul
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint