How to control the Z Order of nodes in the default layer


#1

Hi,

From the image, you can see

image

I drop a node “Abs” , it takes the Zorder as 0
I then add another node “+” over first node. This takes the Zorder as 1. Both the nodes are transparent.

image
Now I add another node " / " separately and select it. Since the third node is selected, it is in the foreground as Part.Layer is set to foreground and hence the other two nodes are in the default layer.


When I go back and select the node in the default layer, I’m able to select “+” node as it takes the order 1. But when I try to select the “Abs” node in the default layer, I’m unable to do so. What I understand is that the order in which the nodes are added in the default layer is the order it takes.
How do I select the inner node? Is there a way to control the Zorder in the default layer?


#2

No, the Node.ZOrder completely controls the z-ordering of the Nodes in the Layer for all Nodes in that Layer that have a ZOrder value.

Is the “+” node selected when you try to click on the “Abs” node? Since it is selected, you have it being in the “Foreground” layer? So perhaps the problem is that there is some transparent fill to some Shape that is intercepting any mouse events that might go to nodes that are behind the “+” node. Make sure those brushes are null, not transparent, to allow the mouse events to pass through the FrameworkElements.