Geeks With Blogs
Catherine Russell Architect, President of "Women In Information Technology" Group
Technorati Tags:

Shawn Wildermuth explaning how it works.
The Silverlight 4 printing support allows to specify a XAML tree to print. We starts with the PrintDocument class.
The StartPrint/EndPrint events are called before and after and are mostly used for setup/teardown of print elements.  The Print method starts the print process and asks the user to specify a printer. After the printer is choosen, the print system calls the PrintPage event sending in printer specs determined from the printer itself:
The PrintPage event passes in a PrintPageEventArgs object that contains a couple of pieces of information. The most important are the Width and Height which can be used to help size your XAML before being printed.  It also allows you to specify the PageVisual which is any UIElement-derived element to be printed. Typically this is either a single control (e.g. DataGrid) or a container for other elements. You can also specify the whole page if you're just doing page printing.  Lastly, you must specify whether there are more pages to print with the HasMorePages property.  When HasMorePages is set to true, the page is printed and the PrintPage is called again to print the second page.

Nov, 27, 2009, 1:11 PM | 7 Comment(s)
Tag(s): Silverlight 4, Printing
 

 

To read more go to URL:

http://wildermuth.com/2009/11/27/Silverlight_4_s_Printing_Support

Posted on Friday, December 11, 2009 10:04 AM Blogs | Back to top


Comments on this post: Silverlight 4's Printing Support

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © CatherineRussell | Powered by: GeeksWithBlogs.net