If you want to quickly learn then these fast application programming interfaces of ByteScout PDF Suite for VB.NET plus the guideline and the VB.NET code below will help you quickly learn PDF viewer control hosted in WPF with PDF viewer SDK. If you want to implement this functionality, you should copy and paste code below into your app using code editor. Then compile and run your application. Enjoy writing a code with ready-to-use sample VB.NET codes to add PDF viewer control hosted in WPF with PDF viewer SDK functions using ByteScout PDF Suite in VB.NET.
If you want to try other samples for VB.NET then free trial version of ByteScout PDF Suite is available on our website.
Class Application ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException ' can be handled in this file. End Class
Class MainWindow Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs) ' Load a sample document on startup pdfViewerControl1.InputFile = "sample.pdf" End Sub Private Sub menuItemOpen_Click(sender As Object, e As RoutedEventArgs) Dim dlg = New Microsoft.Win32.OpenFileDialog() dlg.Filter = "PDF Files (*.pdf)|*.pdf|All Files (*.*)|*.*" Dim result As Boolean? = dlg.ShowDialog() If result = True Then pdfViewerControl1.InputFile = dlg.FileName End If End Sub End Class