Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Floating anchor point on a container (Read 2535 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Floating anchor point on a container
Jul 15th, 2013 at 2:23pm
Print Post  
I am trying to place an anchor point about 25 pixels above the middle of a container and am running into some issues.

When I try to do something like this..

Code
Select All
AnchorPoint ap = new AnchorPoint(50, -10, true, false); 



It does place the anchor point above the container, however it moves around as the container expands in size or is collapsed/expanded, because it is "negative 10 percent" of the height which on a container changes. I need it to stay in the same location regardless of the size of the container.

Do you have any ideas for how I might accomplish this?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Floating anchor point on a container
Reply #1 - Jul 16th, 2013 at 6:58am
Print Post  
We'll add some enum property for next release to specify whether anchor positions are specified in percents or fixed coordinates. If you have the source code, you can edit the AnchorPoint.GetPosition(Rect nodeRect) method to return a fixed position.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Floating anchor point on a container
Reply #2 - Jul 17th, 2013 at 9:15am
Print Post  
This version adds XUnit and YUnit properties to AnchorPoint:
https://mindfusion.eu/_beta/fcnet_apunit.zip

Their default value is Percentage. Set it to Fixed for the Y coordinate to make it stay at a fixed distance from the top:

Code
Select All
AnchorPoint ap = new AnchorPoint(50, -10, true, false) { YUnit = AnchorUnitType.Fixed} ); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Re: Floating anchor point on a container
Reply #3 - Jul 18th, 2013 at 2:24pm
Print Post  
Is it possible to get the source code for this?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Floating anchor point on a container
Reply #4 - Jul 19th, 2013 at 9:39am
Print Post  
Yes, you can request it at support@mindfusion.eu.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint