I'm programmatically generating a FixedDocument
to help me print. FixedDocument.ActualWidth
is coming out as 0
. I suspect this is because I am not actually displaying the FixedDocument. How can I add and display a FixedDocument
object?
This is a beginner question. I'm not skilled with WPF. I looked on MSDN/Goog. Sites make the assumption that I've already added the FixedDocument and just need to manipulate it.
I have:
private FixedDocument CreateFixedDocumentWithPages()
{
FixedDocument fixedDocument = CreateFixedDocument();
fixedDocument.DocumentPaginator.PageSize = size;
PageContent content = AddContentFromImage();
fixedDocument.Pages.Add(content);
return fixedDocument;
}
Pseudocode of what I want: myWpfFormObject.AddChild(fixedDocument)