I am trying to display fixed documents in a WPF application. I was able to do this with both DocumentViewer and WebBrowser controls. But I had to use the absolute file path to get each to work:
DocumentDisplay.Navigate("...\...\Documents\Model Title.pdf") Dim xpsDoc As New XpsDocument("...\...\Documents\Model Title.xps", FileAccess.Read) DocViewer.Document = xpsDoc.GetFixedDocumentSequence() xpsDoc.Close()
I want to use a relative file path in my application. I have seen several examples where some use Application.StartUpPath() and others using Pack URI's. The first option looks the easiest but I am having trouble finding the namespace to reference. The Pack URI option looks much more complicated, but maybe that is just me. I use VB. Thanks.