Z-Order and CollectionChanged.Move

I am trying to implement a Z-Order funcitonality in your GoXam product. Using layers did not seem to mesh with our data model, so our only option for implementing Z-order was to reorder the NodeSource Obsevable Collection.

It seems that your monitor on the Node Source collection is not set up to allow Z-order changes. In GraphLinksModel.cs, the NodesSource_CollectionChanged does not pay attention to the NotifyCollectionChangedAction.Move action, nor does it pay attention to NotifyCollectionChangedEventArgs.NewStartingIndex. The result is that trying to reorder the Node source collection (to change draw order) using .Move or .Insert is ineffective.

Will GoXam be fixed to allow reordering? If not, is there another way to attain Z-ordering without using layers?

Hi,
I’ve also come across this issue.
One workaround I can think about is to remove and add the items from the NodesSource - but this is off course both ugly and very very bad for performance.

The way I go about this is to create layers in advance, in my example I’ve create 20 layers name Layer0, Layer1 and so on and then I’ve use the attached property LayerName to assign each node or link the layer I wanted.
This workaround is also limited because you have to create the layer in advance.

Ido.

Thanks for the reply-

Putting the items on different layers isn’t really feasible because the Z-order logic will not be correct. Either I have every single object (which could be in the tens of thousands) on it’s own layer, or I have multiple objects per layer. If I have multiple objects per layer, I am back to square one.

Currently, as a stopgap, I am rebuilding the collection everytime the Z order changes. This is really an awful way to do Z order, but there is no other choice (that I can think of) without fixing the NorthWood’s code for them.

I also hope it will be fixed soon.

To be clear, z-ordering within a Layer has never been supported.

But we’re investigating adding this feature.