I have a scenario like i have to open a diagram from the XML file.
So when i am opening a Goxam diagram from the xml file,
i have to scale the diagram first and then i have to show the diagram.
For that i have some formulas to calculate scale and that works well.
But the problem as of now, i could able to get the diagram’s height and width from the Diagram.LayoutCompleted event only.
And after that based on the diagram’s height and width and Viewport height and width, i am scaling the diagram.
So at this case, what is happening is that, diagram is shown with the scale what was previously set and then re-scaling to the new one.
I dont want the previous scaled one to be shown, i want only the new re-scaled diagram to be shown.
So is there a way to get the Diagram boundaries before it gets displayed in the Panel rather than getting in Layout Completed event.
Well, you need to wait until layouts are completed before you can know how big the area is that the diagram covers. Since you are loading a diagram you probably want to check in the Diagram.InitialLayoutCompleted event, rather than after each transaction/layout.
But if you do want to do it after each transaction, perhaps you don’t need to define an event handler at all – can you just set DiagramPanel.Stretch to Uniform? GoXam for WPF 2.2.4