Links Z-Order

Is there any way to set the lines for the links to go behind the nodes instead of over them. The path Routing=“AvoidNodes” takes is not always the easiest to follow.

The easiest solution for that is to add the following attribute on the root element of your DataTemplate for Links:



How to put a node on top of other nodes?


Or data-bind this attached property.

Or set the Part.LayerName property programmatically.

Very Thanks!

I use the group diagram.
Want to add note (my Canvas) to the node.

How to put note on top of other parts diagram?
There is a property "go:Part.SelectionAdornmentTemplate", which performs this task.
But it work when you select an element.
Is there another way to solve this problem?

I’m confused – didn’t you already try setting the go:Part.LayerName=“Foreground” on September 28th, in the above reply in this topic? Or is there some other problem?

You can add your own NodeLayers to the DiagramPanel, if you want more layers, although it’s customary to put them behind the “Tool” and “Adornment” layers.

How to put one part of the node (orange note) to top layer, and second part (green ellipse or white rectangle) to current layer?
Sept. 28 solved this problem for the treemodel, now I need to solve for the groupmodel.

If I change a layer for node2 , then I can not select a node4, node5, node6. They will be lower than the node2.

Setting go:Part.LayerName is independent of the model.

I see what you mean about changing the layer of a group. It does not change the layers of the group’s member nodes and links. You’ll need to do that explicitly, recursively including nested groups.

I’m not sure what’s in the updated 1.2beta DLL that I made available yesterday, but it probably contains a new method, Group.FindSubGraphParts(), that will return all of the nodes and links that are recursively inside a Group.

Another way to fix the problem is to make sure the Group does not have a Background brush. That way mouse events will get to the member nodes and links, even though they remain in a layer behind the container group’s layer.