Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ContainerNode Adjustments (Read 3606 times)
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
ContainerNode Adjustments
Nov 16th, 2016 at 10:01am
Print Post  
Hi there

we have a custom container node (by deriving from ContainerNode) and I have two questions.
First: Is it possible to somehow have a transparent background on the rendered container, so we still would see the Grid that is set on the Diagram?

And the second one is an issue with when we draw links. So whenever we wanna draw a link it tries to connect to somewhere on the container itself, but we don't want this container to have any anchor points at all. I tried setting the AnchorPoints property to both null and to initialize an Empty Anchor pattern, but both did not work.

Thanks for your help
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: ContainerNode Adjustments
Reply #1 - Nov 16th, 2016 at 11:08am
Print Post  
Hi!

Try following properties -

Code
Select All
//container.Brush = new SolidColorBrush(Color.FromArgb(100, 255, 255, 255));
container.Brush = Brushes.Transparent;
container.AllowIncomingLinks = false; 



Setting AnchorPattern to null should work too if diagram's AllowUnanchoredLinks is disabled.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
Re: ContainerNode Adjustments
Reply #2 - Nov 16th, 2016 at 11:37am
Print Post  
Hi Slavcho

both things work now, thanks for your help Smiley

Regards
  
Back to top
 
IP Logged
 
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
Re: ContainerNode Adjustments
Reply #3 - Nov 16th, 2016 at 11:57am
Print Post  
Hi Slavcho

just one thing I just realized was that since I changed:
container.AllowIncomingLinks = false;

I have an exception as soon as I hover with my mouse over any node in the Diagram (you don't need to click, just hover is enough) when try to validate the anchor point (I guess you check if you display a different handle depending on if the mouse is on an actual anchor point...).

I put the exception message as a attachement.
Whenever we try to access e.Destination or e.ChangingDestination there seems to be some internal exception. You see some commented out code above, if I enable this code everything works fine.

Best Regards


  

mindfusion_exception.png ( 111 KB | 120 Downloads )
mindfusion_exception.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: ContainerNode Adjustments
Reply #4 - Nov 16th, 2016 at 2:48pm
Print Post  
Hi,

This event is raised with e.Link set to null when hovering over a node, just to determine whether any outgoing link could be drawn and show respective mouse pointer. For time being add an "if (e.Link == null) return" check in the beginning of handler. We'll fix ChangingOrigin / ChangingDestination to handle null links too, but you might need to verify that anyway because the screenshot shows access to e.Link members from the event code.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
Re: ContainerNode Adjustments
Reply #5 - Nov 16th, 2016 at 2:53pm
Print Post  
Hi Slavcho

ok I quickly tried and it works.

Thanks for your help and your quick response.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint