I am working on rendering XPS documents in a WCF service and want it to be as fast as possible.
Is it possible to turn off any UI related overhead, since there is no UI interaction necessary in my use case? I want to just utilize the UI layout management piece of Xaml. Basically, how can I turn off anything unnecessary to the creation of a document?
When I'm done rendering, I'm adding each FrameworkElement
to a DocumentPage
s to be rendered with a DocumentPaginator
and then saving that to an XPS using the XpsDocumentWriter
.
Just make sure you don't call Application.Run
in your service and there will be no message loop processing Windows messages.