Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set no. of copies in a System.Windows.Controls.PrintDialog

Tags:

c#

wpf

For what I searched so far, I could not find a way to preset the number of copies in a System.Windows.Controls.PrintDialog, which is the one used in WPF. I cannot fallback or use another one because I need the PrintVisual method that only this class offers (afaik) Unless there is another way, I'm thinking of doing a for loop and call the dialog.PrintVisual() method for the number of desired copies.I have not tested yet, but I'm quite sure it should work. My question: Is this the correct way of doing it?

like image 883
Ben Junior Avatar asked Feb 16 '23 14:02

Ben Junior


1 Answers

You're looking for dialog.PrintTicket.CopyCount.

Docs.

like image 122
SLaks Avatar answered Feb 19 '23 20:02

SLaks