Live Chat Icon For mobile
Live Chat Icon

How to load an XPS document into the DocumentViewer?

Platform: WPF| Category: DocumentViewer

XPS documents can be easily loaded into the documentviewer.

Here’s the code snippet.

[XAML]
          
   <DocumentViewer Name='documentViewer' />
[C#]

   XpsDocument xpsDocument = new XpsDocument('sample.xps', FileAccess.Read);
   documentViewer.Document = xpsDocument;

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.