SilverlightShow: A look at the Printing API in Silverlight Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) RE: A look at the Printing API in Silverlight 4 Wrong statement<br /> <br /> - <strong>EndPrint</strong> – Event fired when the printing is either completed or cancelled. The EndPrint isn't fired when clicking CANCEL on the Print Dialog http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment5132 Marc Roussel http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Tue, 21 Dec 2010 14:36:33 GMT RE: How can print any grid? <p>@Johnny</p> <p>try this: http://www.davidpoll.com/2010/04/16/making-printing-easier-in-silverlight-4/</p> http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment4639 Dilbert http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Sat, 09 Oct 2010 12:45:54 GMT RE: A look at the Printing API in Silverlight 4 <p>How can print any grid?</p> http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment3989 Johnny http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Wed, 14 Jul 2010 16:00:35 GMT RE: A look at the Printing API in Silverlight 4 @<span id="ctl00_cphMiddle_ContentPlaceHolderContent_itemComments_dlstComments_ctl14_lblCommentAuthor">Apoorv: remove debug breakpoints</span> from btnPrint_Click and printpage event handler, this is a "timing" problem (.NET refuses request after some wait time). http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment3967 SLNoob http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Fri, 09 Jul 2010 16:38:56 GMT RE: A look at the Printing API in Silverlight 4 <p>I am getting the following error</p> <p>{System.Security.SecurityException: Dialogs must be user-initiated.<br />    at System.Windows.Printing.PrintDocument.Print(String documentName)<br />    at McKesson.PPS.Fusion.UI.Module.Encounter.Views.SearchEncounterView.btnPrint_Click(Object sender, RoutedEventArgs e)<br />    at System.Windows.RoutedEventHandler.Invoke(Object sender, RoutedEventArgs e)<br />    at System.Windows.Controls.Primitives.ButtonBase.OnClick()<br />    at System.Windows.Controls.Button.OnClick()<br />    at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)<br />    at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)<br />    at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)}</p> http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment3795 Apoorv http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Mon, 14 Jun 2010 20:12:05 GMT RE: A look at the Printing API in Silverlight 4 <p>Everyone on the 'net doesn't see the RTW object model for PrintDocument:</p> <p>No more DocumentName property, it's a param to the Print method now. </p> <p>Plus new BeginPrint</p> <p>namespace System.Windows.Printing<br /> {<br />     // Summary:<br />     //     Provides printing capabilities for a Silverlight application.<br />     public class PrintDocument : DependencyObject<br />     {<br />         // Summary:<br />         //     Gets the identifier for the System.Windows.Printing.PrintDocument.PrintedPageCount<br />         //     dependency property.<br />         //<br />         // Returns:<br />         //     The identifier for the System.Windows.Printing.PrintDocument.PrintedPageCount<br />         //     dependency property.<br />         public static readonly DependencyProperty PrintedPageCountProperty;</p> <p>        // Summary:<br />         //     Initializes a new instance of the System.Windows.Printing.PrintDocument class.<br />         public PrintDocument();</p> <p>        // Summary:<br />         //     Gets the number of pages that have printed.<br />         //<br />         // Returns:<br />         //     The number of pages that have printed.<br />         public int PrintedPageCount { get; }</p> <p>        // Summary:<br />         //     Occurs after the System.Windows.Printing.PrintDocument.Print() method is<br />         //     called and the print dialog box successfully returns, but before the System.Windows.Printing.PrintDocument.PrintPage<br />         //     event is raised.<br />         public event EventHandler<BeginPrintEventArgs> BeginPrint;<br />         //<br />         // Summary:<br />         //     Occurs when the printing operation is complete or when the print operation<br />         //     is cancelled by the application author.<br />         public event EventHandler<EndPrintEventArgs> EndPrint;<br />         //<br />         // Summary:<br />         //     Occurs when each page is printing.<br />         public event EventHandler<PrintPageEventArgs> PrintPage;</p> <p>        // Summary:<br />         //     Starts the printing process for the specified document by opening the print<br />         //     dialog box.<br />         //<br />         // Parameters:<br />         //   documentName:<br />         //     The name of the document to print.<br />         //<br />         // Exceptions:<br />         //   System.Security.SecurityException:<br />         //     The print operation is not user-initiated.<br />         [SecuritySafeCritical]<br />         public void Print(string documentName);<br />     }<br /> }</p> http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment3585 Fred Derf http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Tue, 11 May 2010 23:15:11 GMT RE: A look at the Printing API in Silverlight 4 <p>Once readed this good article an appropiate one for further reading:</p> <p><a href="http://www.davidpoll.com/2010/04/16/making-printing-easier-in-silverlight-4/">http://www.davidpoll.com/2010/04/16/making-printing-easier-in-silverlight-4/</a></p> http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment3555 Braulio http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Sat, 08 May 2010 11:58:55 GMT RE: A look at the Printing API in Silverlight 4 Update to RTW would be nice, including some additional topics like how to handle paper size, dpi's... http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment3554 Braulio http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Sat, 08 May 2010 11:53:46 GMT RE: A look at the Printing API in Silverlight 4 What appen if the user just press "Cancel" in the dialogbox of print, because to me it's not working... http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment3469 Zareth http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Thu, 22 Apr 2010 10:47:23 GMT RE: A look at the Printing API in Silverlight 4 also can print crystal report as such way? http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment3361 anjumkml http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Thu, 08 Apr 2010 10:47:23 GMT RE: A look at the Printing API in Silverlight 4 Me like... :-) http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment2723 Abbot http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Mon, 30 Nov 2009 11:18:14 GMT RE: A look at the Printing API in Silverlight 4 Nice батенце nice :) http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx#comment2717 Alex http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx Thu, 26 Nov 2009 12:19:56 GMT