Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XPS with Windows Forms

What is the best way to display and print XPS files in a Windows Forms application?

like image 767
Michael Damatov Avatar asked Oct 10 '08 22:10

Michael Damatov


2 Answers

I think the easiest way is to use WPF, you can host a WPF control inside a WinForms application - you don't have to rewrite your GUI in WPF or anything like that.

more information here : http://msdn.microsoft.com/en-us/library/ms745781.aspx

like image 156
Nir Avatar answered Nov 10 '22 19:11

Nir


On my machine, XPS files open automatically thru IE. I would just drop a WebBrowser control on the form and navigate to the XPS file then call the Print() method.

like image 41
Jason Z Avatar answered Nov 10 '22 20:11

Jason Z