PDFsharp & MigraDoc Forum
https://forum.pdfsharp.net/

How to show a MigraDoc document on the MainWindow.xaml?
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2719
Page 1 of 1

Author:  seganfredo [ Wed Jan 29, 2014 4:20 pm ]
Post subject:  How to show a MigraDoc document on the MainWindow.xaml?

Hello guys,

I'm trying to show a MigraDoc document on the MainWindow.xaml. I'm using Visual Studio 2010, C#, Framework .NET 4.0. Anyone knows how to do it? I read the DocumentViewer Sample but i don't understand yet how to show the document on the MainWindow Screen. I just tried a lot of stuff.

Thanks!

Author:  seganfredo [ Fri Jan 31, 2014 12:20 pm ]
Post subject:  Re: How to show a MigraDoc document on the MainWindow.xaml?

Anyone?

Author:  Thomas Hoevel [ Mon Feb 03, 2014 4:11 pm ]
Post subject:  Re: How to show a MigraDoc document on the MainWindow.xaml?

Add a
Code:
<md:DocumentPreview x:Name="preview"/>
to your main window.

In your code assign the document (in MDDDL format) to the DDL property of "preview" (name used with "x:Name" in the code snippet above):
Code:
preview.Ddl = ...


It's all in the sample.

With more specific questions you will get more specific answers.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/