troubleshooting Question

Finding the DesiredSize of a FrameworkElement before display

Avatar of mayalan
mayalan asked on
.NET Programming
1 Comment1 Solution256 ViewsLast Modified:

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  
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros