WPF Reflections

Apr 22 2008   3:25PM GMT

WPF Printing – why is it small

Mark Shurmer Profile: MarkWPF

When you get to printing in WPF, you will find it so much easier than printing in previous Microsoft UI design (ie Winforms and MFC). See a previous post of mine to see how easy.

One thing that does occur though, is that when you print your element/canvas/grid/whatever, it will usually go on the printer very small. Why is that?
Actually, I think it is a good thing 🙂
What it means is that it’s printing exactly the same on the printer as on the screen, something we have been begging for, for ages [well since we’ve had GUI’s anyway].

So how can you make it bigger, well it’s pretty easy when you know how:

You simply make the element bigger by using a Transform before printing, like

grid.LayoutTransform = new ScaleTransform(6,6);
printDlg.PrintVisual(grid, “My vision”);

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: