Bonjour,
J'aimerai imprimer un panel WPF. J'ai donc fait ça :
Malheureusement, si j'ai un panel très grand, celui-ci ne rentre pas dans ma page (normal...).
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 UIElement panelToPrint_l = this.dockingManager.ActiveDocument.Content as UIElement; if (panelToPrint_l != null) { // Create the print dialog object and set options PrintDialog printDialog_l = new PrintDialog(); printDialog_l.PageRangeSelection = PageRangeSelection.AllPages; printDialog_l.UserPageRangeEnabled = true; // Display the dialog. This returns true if the user presses the Print button. Nullable<Boolean> print = printDialog_l.ShowDialog(); if (print == true) { printDialog_l.PrintVisual(panelToPrint_l, "Printing active panel..."); } }
Du coup, j'aimerai savoir comment faire pour :
1) soit réduire mon panel pour qu'il rentre dans la page
2) soit découper mon panel en fonction de la taille de la page et imprimer le panel sur plusieurs pages
Merci d'avance.
Partager