How to measure size of content once scaled to fit the zoombox?
#4
Maybe you can try to use LayoutTransform to rotate your content.

To give you more control over the process I would load the svg file in code with Ab2d.ReaderSvg class (instead of SvgViewbox). After reading the svg file you will get a Viewbox with read objects.

Because Viewbox has its own layout management, it is recommended to get its child (Canvas) and use for the ZoomPanel's child. Before changing the parent of the Canvas, you need to disconnect it from Viewbox first.

Than add LayoutTransform with rotate transform.

Code:
Viewbox svgViewbox = Ab2d.ReaderSvg.Instance.Read(svgFileName);
Canvas svgRootCanvas = svgViewbox.Child as Canvas;
svgViewbox.Child = null; // disconnect canvas

svgRootCanvas.LayoutTransform = new RotateTransform(90);

ZoomPanel1.Content = svgRootCanvas;
ZoomPanel1.Refresh();
Andrej Benedik
  


Messages In This Thread
RE: How to measure size of content once scaled to fit the zoombox? - by abenedik - 03-15-2012, 10:12 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)