Hello all,
In trying to get a Silverlight 4 application with printing, I've had to fiddle with my layout on the PrintPage Event. The biggest issue being the map's width (800 seems to be the magic number to print on a 8.5x11 sheet of paper). I have no issue shrinking it down (using a MaintainExtentBehavior to make sure all the grpahics stay on the page), but I do have a problem in expanding it back to full size.
Currently, I'm setting it back to a hard value of 1200, but this is no ideal since many of my users have different monitors and use different resolutions. Plus, having a set number isn't friendly for resizing the browser. I've seen where a FrameworkElement can have it's Height and Width set to "Double.NaN" in order to take up all available space and this does indeed work. I use it for a DataGrid in the same application. However, this does not work for the Map control.
Is there another way that I can get the desired result? This is pretty much the only thing keeping the application from being finished.