(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .

Printing Tip – Handling User Initiated Dialogs Exceptions

(0 votes)
0 comments   /   posted by Silverlight Show on Jun 15, 2010
Tags:   tips , printing , silverlight-4 , john-papa
Take a look at this tip where John Papa demonstrates how to handle user initiated dialogs exceptions.

I see this question every so often so it makes sense to share it through a quick post. When using the print API in Silverlight 4 you can run into the dreaded exception:

“System.Security.SecurityException: Dialogs must be user-initiated”

Then you examine your code and confirm that your code where you invoke the PrintDocument’s Print method are indeed being handled by a user-initiated event. If you are not invoking Print in a user-initiated event then your know your solution :)


Comments

No comments

Add Comment

Login to comment:
  *      *       

Our News on Twitter