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  
.NET Programming

Avatar of undefined
Last Comment
Meir Rivkin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Meir Rivkin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck