I think this may be a timing issue. I am using an SvgViewbox within a ZoomPanel to load the content from an svg file. I am trying to detect the size of the content in the SvgFileLoaded event of the SvgViewbox but on first load the ActualContentBounds is coming up empty. I tested this before and after I call refresh. Does this only work once a layout pass has occurred by wpf? The size i got before may actually have been from the previous content that was loaded from what I can tell since I load several different svg files that are different sizes. The sample project I sent you has the actual content I am working with.
Maybe I am going about this the wrong way. What I am trying to accomplish is setting the zoom of the zoompanel so that the content fits the window when its rotated 90 degrees left or right. When content is not rotated, the zoompanel sizes it for me automatically. I was taking the approach of loading the content without rotation, measure the content once its scaled to fit, then doing the calculation of its rotated size to figure out how much to zoom in or out to fit the window. Do you have a better way to approach this?
Maybe I am going about this the wrong way. What I am trying to accomplish is setting the zoom of the zoompanel so that the content fits the window when its rotated 90 degrees left or right. When content is not rotated, the zoompanel sizes it for me automatically. I was taking the approach of loading the content without rotation, measure the content once its scaled to fit, then doing the calculation of its rotated size to figure out how much to zoom in or out to fit the window. Do you have a better way to approach this?