You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: WindowsForms/PDF-Viewer/How-To/How-to-make-Winforms-PdfViewer-have-enriched-features-like-WPF-PdfViewer.md
+24-42Lines changed: 24 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,70 +11,52 @@ documentation: ug
11
11
To leverage the advanced features offered by the WPF PdfViewer, such as adding annotations, form filling, signatures, stamps, sticky notes, and more, you can [integrate the WPF PdfViewer into the Windows Forms](https://support.syncfusion.com/kb/article/7882/how-to-host-pdf-viewer-in-windows-forms-application) and take advantage of its extensive feature sets.
12
12
13
13
we can host a WPF PdfViewer control within a Windows Forms application using an ElementHost. By embedding the WPF PdfViewer, you can access advanced features available in the WPF control while maintaining a Windows Forms interface.
14
-
To host the WPF PdfViewer in the winforms application follow the below steps,
15
14
16
-
1. Create an UserControl and add the below XAML code to it.
15
+
## Steps to host the WPF PdfViewer in the winforms application
17
16
18
-
* Add the following Syncfusion® namespace in XAML to make use of the WPF [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html)
17
+
1. Add an WPF UserControl and install the [Syncfusion.PdfViewer.WPF](https://www.nuget.org/packages/Syncfusion.PdfViewer.WPF) NuGet package to your WinForms application.
18
+
19
+
2. Add the following Syncfusion® namespace in XAML to make use of the WPF [PdfViewerControl.](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html)
pdfViewer.Load(@"../../Data/Windows Store Apps Succinctly.pdf");
69
53
}
70
-
}
54
+
}
71
55
72
56
{%endhighlight%}
73
57
{% endtabs %}
74
58
75
-
2. Create an ElementHost object in the Form and add the created UserControl's object as child to the ElementHost object.
76
-
77
-
To do the above step follow the below procedures
59
+
5. Add a panel to the form. Create an ElementHost object in the Form and add the created UserControl's object as child to the ElementHost object. Add the elementHost as a child to the panel as mentioned below.
78
60
79
61
{% tabs %}
80
62
{% highlight c# %}
@@ -122,4 +104,4 @@ namespace SampleWF
122
104
{%endhighlight%}
123
105
{% endtabs %}
124
106
125
-
You can find the sample for you reference [here](https://www.syncfusion.com/downloads/support/directtrac/general/ze/SampleWF920548313)
107
+
You can find the complete sample in the [Github](https://github.com/SyncfusionExamples/WinForms-PDFViewer-Examples/tree/master/How-to/Host-WPFPdfViewer-in-Winforms/HostedPdfViewer) for your reference.
0 commit comments