Hi Mark,
We have analyzed your query, we are unable to reproduce the reported issue. However, we suspect that you haven’t specify the Shape of the Node while adding the Node to diagram. So please check that. Please refer the code snippet to specify the Shape of the Node.
Code Snippet :
|
Node node = new Node(); node.Shape = Shapes.Rectangle; |
If it doesn’t resolve your issue, please provide more information. It will be a great help for us if you provide us with a simple sample to reproduce the reported issue for better assistance.
Regards,
Sudhakar.C
Hey Sudhakar,
I moved the DiagramModel and DiagramView into my ViewModel layer to remove binding to an intermediate collection which got me past the issue. But I think if you set up a example where you bind to an ObservableCollection<Node> property of a ViewModel, you'll get the same problem I experienced where some nodes appear and others don't if they are added through code. I tried specifying different Node shapes both during constructor and after instantiation, neither resolved the problem.
I started working around it by re-binding the diagram to a List<Node> but it meant the layout had to be reset everytime a Node was added which was not practical.
So what Ive done now is move the DiagramModel and DiagramView back into my ViewModel to eliminate any intermediate binding issues (which works but not ideal) while you identify the problem?
Hi Mark,
We suspect that the Nodes are not rendered properly in the Diagram. There may be a rendering problem while binding the ObservableCollection<Node>. So, please provide us a simple sample to reproduce the issue, it will be of great help for us to find the solution.
Note : Please check if you have set the shape of the Node (or) you have set any customized shape to the Node.
Please let us know if you have any concerns.
Regards,
Sudhakar C