Here's the situation.
I'm tasked with auto-generating a rather large document consisting of a number of distinct sections of varying height and constant (full-page) width.
Each section consists of two distinct sub-sections. Think of them as "header" and "data."
The problem, then, is: When only one section fits on a page (because it has a lot of data) the header should display at the very top and the data should display at the very bottom, leaving any unused space in the center.
When more than one section fits on a page everything should "squish to the top", leaving no space between the sub-sections, or even the sections. All of the extra whitespace should be at the bottom.
What sorts of constructs can I use to accomplish this?
Perhaps this is a task better suited to a FixedDocument? I have a rather large book on WPF, but it only barely mentions FixedDocuments.
Not sure if you are still battling with this issue, but you could try using FlowDocument.
if you write a wrapper around DocumentPaginator you'll be able to insert a header into the flowdoc. Also, you can set the flowdoc.PagePadding to a custom value, taking into account the printablePageHeight and the height of your content-size.
Here's an example of a wrapper around the DocumentPaginator which I got from the book : Pro WPF in C# 2008 - Mathew MacDonald
Hope it helps. (PS. I just copied and pasted the default so didn't add any custom calcs etc.)