I suspect the easiest thing to do is to just:
myDiagram.Panel.Stretch = StretchPolicy.Uniform; myDiagram.Panel.Stretch = StretchPolicy.Unstretched;
We have already added a DiagramPanel.ZoomToFit method for the next version, so that you don’t have to do such inelegant code.
Thanks that did the trick, at least when setting Unstretched after LayoutCompleted.
if (myDiagram.Panel != null && e.Change == ModelChange.ChangedNodesSource)
myDiagram.Panel.Stretch = StretchPolicy.Uniform;
myDiagram.Panel.Stretch = StretchPolicy.Unstretched;
I’m glad you figured out that you might need to delay resetting the DiagamPanel.Stretch property. I should have pointed out that possibility, since I hadn’t actually tried that code.
I can find this property at my end i am using 18.104.22.168 version of silverlight goxam.
I am trying to find it DiagramPanel.ZoomToFit .Is there any more new version available??