Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ContainerChildAdded container zindex issue (Read 1798 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
ContainerChildAdded container zindex issue
Mar 12th, 2013 at 6:54pm
Print Post  
In situations involving a shapenode moved into a nested container, the ContainerChildAdded event often seems to return a ZIndex of -1 for ContainerChildEventArgs.Container.ZIndex. This means I can't always rely on this method to perform certain zindex corrections I had been hoping to make. Any idea why this would be happening?
  
Back to top
 
IP Logged
 
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Re: ContainerChildAdded container zindex issue
Reply #1 - Mar 12th, 2013 at 8:45pm
Print Post  
Related strange behavior...

I have a container within a container. The outer container has a zindex of 0, and the inner container has a zindex of 1. When I drag a shapenode inside the inner container, the zindex of the inner container changes to 0.

Are there known issues with containers in containers and the zindex property?
  
Back to top
 
IP Logged
 
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Re: ContainerChildAdded container zindex issue
Reply #2 - Mar 12th, 2013 at 8:50pm
Print Post  
In the previous post, I should say that the args.Container.ZIndex inside of ContainerChildAdded is 0. However, if I am inside of the node modified event and iterate through the nodes, I can find that same container with a ZIndex of 1 as it should be.

It seems like an issue with ContainerChildAdded.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ContainerChildAdded container zindex issue
Reply #3 - Mar 13th, 2013 at 6:39am
Print Post  
Hi,

What kind of Z order corrections do you need to implement? The control changes ZIndex of a container automatically when you drop a node inside it, to ensure the container is drawn behind the child. That happens when child.ZIndex <=container.ZIndex; in that case container.ZIndex is automatically set to child.ZIndex - 1. Since version 6 of the control, ZIndex values no longer correspond to indices within diagram.Items, and ZIndex can have a negative value too.

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