在 Silverlight 打印中捕获打印对话框的取消 [英] Capture print dialog's cancel in silverlight printing

查看:47
本文介绍了在 Silverlight 打印中捕获打印对话框的取消的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道您是否可以找出是否单击了打印对话框的取消?

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

我看过帖子和文档说EndPrint – 打印完成或取消时触发事件."

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.

谢谢

推荐答案

根据文档,我认为没有简单的方法:http://msdn.microsoft.com/en-us/library/system.windows.printing.printdocument.endprint(v=VS.95).aspx

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

特别是:

EndPrint 事件在以下情况下不会发生用户取消打印操作从打印对话框.一种BeginPrint 事件将始终发生在 EndPrint 事件之前.

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.

显然 EndPrint 事件只是在文档实际打印的情况下进行清理,而不是在取消打印对话框的情况下进行清理.

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.

这篇关于在 Silverlight 打印中捕获打印对话框的取消的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆