1. создайте проект WinFroms VB с именем VBWinForms
2. добавьте WPF userControl с именем VBWPFDocumentViewer и добавьте DocumentViewer в сетку в xaml
<Grid><DocumentViewer></DocumentViewer></Grid>
3. Создайте свой проект и пользовательский элемент управления (VBWPFDocumentViewer) будет показан в ToolBox ![enter image description here](https://i.stack.imgur.com/GdHxu.png)
4. добавьте VBWPFDocumentViewer в Form1.vb
Вы также можете использовать ElementHost для загрузки DocumentViewer, вот шаг:
1. проект с именем VBWinForms и добавьте WPF userControl с именем VBWPFDocumentViewer
2. добавьте ElementHost и событие Form1_Load для Form1.vb [Design], добавьте код в Form1.vb, как показано ниже:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim host As ElementHost = New ElementHost()
host.Dock = DockStyle.Fill
Dim uc As VBWinForms.VBWPFDocumentViewer = New VBWinForms.VBWPFDocumentViewer()
host.Child = uc
Controls.Add(host)
End Sub
3. запустите проект, чтобы отобразить documentViewer