Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capture print dialog's cancel in silverlight printing

Does anyone know if you can find out if the print dialog's cancel was clicked?

I've seen post and doc that say "EndPrint – Event fired when the printing is either completed or canceled. "

But I don't think that is the print dialog's canceled... I think the is if the print job is canceled.

thanks

like image 286
Gern Blanston Avatar asked Sep 27 '10 12:09

Gern Blanston


1 Answers

Based on the documentation, I don't believe there's an easy way: http://msdn.microsoft.com/en-us/library/system.windows.printing.printdocument.endprint(v=VS.95).aspx

In particular:

The EndPrint event will not occur if the user cancels the print operation from the print dialog box. A BeginPrint event will always occur before an EndPrint event.

Apparently the EndPrint event is only to clean up in the case of the document actually printing, not in the case of canceling the print dialog.

like image 102
pho79 Avatar answered Oct 12 '22 04:10

pho79