0

I have a header section and a footer section on my WPF and the ListView is the body. I wish to print the header, the entire content of the ListView (including all its items) without scrollbars, and the footer.

Please note I am not asking for a spoon feeding answer. I am asking for guidance into the right direction.

This is my code I got so far. However this does not work perfectly. When the scrollbars of the ListView appears then some of the items does not print.

PrintDialog printDialog = new PrintDialog();  
if (printDialog.ShowDialog() == true)
{
   printDialog.PrintVisual(gridContent, "Invoice");
}
  • 1
    If the three elements you want to print aren't the only child controls of some common parent, rearrange your XAML so that they are. [Then get an image of the common parent](https://stackoverflow.com/questions/5403831/how-to-create-an-image-of-a-wpf-usercontrol-at-runtime) and print that. – 15ee8f99-57ff-4f92-890c-b56153 Dec 17 '17 at 19:24
  • Let me add, I can print. However when the scrollbar appears the rest of the content is cut off. I am struggling to find a way to print all the content in the ListView. After that I want to print the footer section. I am going to edit the question – Rhonwen Van Druten Dec 17 '17 at 19:28

0 Answers0