C# XPS FixedDocument fails to save, width and height must be non-negative
I am having a problem with a XAML report that needs to be saved to XPS. Whenever the save is called the XPS Writing failed due to, "Height and Width must be non-negative".
When I inspect the object, most heights and widths are set to NaN. I am assuming this is ok and is used as an auto value. I have 2 reports built the same way and one saves and one doesn't.
Is it possible that the problem is in the XAML usercontrols rather than in the way the document is constructed? The page size is set as follows.
fixedDocument = new FixedDocument();
fixedDocument.DocumentPaginator.PageSize = new Siz开发者_运维问答e(fixedDocumentWidth, fixedDocumentHeight);
Any ideas would be much appreciated!
Problem fixed, an error with the graphing software caused the problem with the layers.
精彩评论