Link to home
Start Free TrialLog in
Avatar of mayalan
mayalan

asked on

Finding the DesiredSize of a FrameworkElement before display


I am creating a fixed document from a flow document using a custom paginator like the one given here. I want to add a header/footer to the page but neither are a fixed size and need to be calculated (so the page size can be adjusted accordingly to fit them).

The header/footer are represented as a FrameworkElement class. I need to work out the desired size of the FrameworkElement before placing it on the page so the page margin size of the paginator can be adjusted to accomodate everything.  Is there an easy way to do this?

thanks  
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial