I needed to print a Canvas. This is the easiest possible solution (I think?!)
| |
|
|
| | // Create the print dialog object and set options |
|
| | System.Windows.Controls.PrintDialog pDialog = new System.Windows.Controls.PrintDialog(); |
|
| | pDialog.PageRangeSelection = PageRangeSelection.AllPages; |
|
| | pDialog.UserPageRangeEnabled = true; |
|
|
|
|
| | // Display the dialog. This returns true if the user presses the Print button. |
|
| | Nullable<Boolean> print = pDialog.ShowDialog(); |
|
|
|
| | pDialog.PrintVisual(CurrentPrintingCanvas(),"Modlr Diagram"); |
|
|
|
|
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home