In the constructor of my LedgerPage, I've this:
Page = new FixedPage() {
Width = PageSize.Width,
Height = PageSize.Height,
Margin = new Thickness(margin),
Children = { header, content, footer }
};
and after some property change, I call measure and this is what I've to position items in the Page:
void measure() {
var availableSize = new Size(PageSize.Width - 2 * margin, PageSize.Height - 2 * margin);
...
double y = 0;
foreach (FrameworkElement item in Page.Children) {
item.Width = availableSize.Width;
item.Measure(availableSize);
item.Arrange(new Rect(new Point(margin, y), item.DesiredSize));
y += item.DesiredSize.Height;
}
...
}
BUT it positions all three items in same place so they overlap:

In the previous version of this app, I'd one Grid as the Children of Page and in that I put header, content and footer. Now, I want to get rid of that and position each item in the FixedPage, how to do that?