In my WPF application, I am going to print the contents of my ListBox. I want to add a new control to the PrintDialog box to select the number of lines (items) to print.
Is it possible to customize the existing PrintDialog box and add a new control to bind to ListBox.Count?
Or is there a better way to do this?
It's actually possible to extend common dialogs with .NET. I found this article on MSDN. However, I'm not sure whether this also applies to the print dialog or whether it can still be done, but I suggest you read that first.
"C# provides a standard PrintDialog which has all the basic print dialog functionality. Since it is declared as a sealed class, there is no way to extend it through C# native syntax."
Please see the following link: http://www.codeproject.com/Articles/16797/Extending-C-PrintDialog-Part-I
You can always create your own "Printing dialog screen" from scratch , then you can add your drop down with the ammount of lines to print(dropdown) witch you then get from the listbox(concatenating or build string) and send to a specified printer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With