Printing a datagrid

I'm trying to print a datagrid in WPF and I may be barking up the wrong tree.

I use the following code, some of which is ruthlesslesly clipboarded off the intarwebs.

There are several problems. I use a dedicated, in-memory, control and copy the ItemsSource to it and measure/arrange it (in memory) to its preferred size. This takes a lot of time and eats a *lot* of memory which is never freed again. I then capture it screen
by screen and print it. Only the first page is actually printed although it seems it got the number of pages right as it includes them they're just empty. I tried using a FixedDocument with the same pattern with almost the same results.

Do I *have* to implement a DocumentPaginator to print a datagrid over several pages? You'd think there was some build in trick for such a common task?

Hi, I am trying to print a usercontrol in documentPaginator class. The user control has a datagrid in it. My problem starts that while printing to XPS document, datagrid is populated with data i send but when printing to a physical printer, i can only
see blank rows in datagrid. My other fields on user- control are populated but only datagrid is creating an issue. Can u point out what mistake am i making or what other measures do I need to take care so that my datagrid prints properly on physical printer
too.