xpsdocument

Printing BlockUIContainer to XpsDocument/FixedDocument

筅森魡賤 提交于 2019-11-27 20:35:08
问题 Question How do you print a FlowDocument that have BlockUIContainer ? How can I force a Measure/Update/Arrange on a FlowDocument? Background I have a generated FlowDocument with paragraphs of text with a few Rectangle elements filled DrawingBrushes from a resource dictionary and BlockUIContainer with custom controls. The document renders correctly when viewed in any of the FlowDocument* controls HOWEVER when the document is converted to a FixedDocument/XpsDocument, none of the Rectangle or

How do you hide a WPF DocumentViewer's menu bars?

妖精的绣舞 提交于 2019-11-27 15:17:27
问题 At the moment I have a DocumentViewer in a WPF window that displays an XPS file. I have created my own "Next Page" and "Previous Page" buttons and have set the DocumentViewer.Background property to be completely transparent. All that is left of the DocumentViewer's own controls is the menu bar at the top (displaying zoom settings, print, etc.) and the "Find" bar at the bottom. I would quite like to remove (or hide) both of these bars, but I can't seem to figure out how!? Also, when the

How to create an XPS document?

走远了吗. 提交于 2019-11-27 00:46:04
问题 I'd like to create an XPS document for storing and printing. What is the easiest way to create an XPS document (for example with a simple grid with some data inside) in my program, and to pass it around? 回答1: Nothing easy about it. But it can be done. I've got some (sadly, still buggy) sample code and information on my blog for creating the document in memory. Here's some code I whipped up for testing that encapsulates everything (it writes a collection of FixedPages to an XPS document in