2013-04-08

View Office documents in WPF Application

Well. The answer is DocumentView WPF control.


  1. First the office document should be converted to XPS type document. Please look at this post.
  2. Then bind it to the Document property of the DocumentViewer control.
XAML

<DocumentViewer Name="myDocumentViewer" Margin="0,0,0,59">

</DocumentViewer>

And code behind;

myDocumentViewer.Document = this.ConvertOfficeDocToXPSDoc(this.FileName, this.newXPSDocumentName).GetFixedDocumentSequence();

That's all you need to do.

4 comments:

  1. Hi,I have studied how to View Office documents in WPF Application

    -Hari
    Theosoft

    ReplyDelete
  2. Good view on WPF application. WPF combines application UIs, 2D graphics, 3D graphics, documents and multimedia into one single framework for more information and free tutorials free demos visit.....
    Check this site tekslate for indepth wpf-tutorials
    Go here if you’re looking for information on wpf-tutorials

    ReplyDelete

මචන්ලා.... comments ටිකක්................