I only made a button to add a document. Is it possible to somehow load a document from a folder with a Visual Studio project or something else?
private void Load_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "XPS file (*.xps)|*.xps";
if (ofd.ShowDialog() == true)
{
XpsDocument doc = new XpsDocument(ofd.FileName, FileAccess.Read);
documentViewer.Document = doc.GetFixedDocumentSequence();
}
}