Reputation: 31
I am working on Windows Store App. I have a folder named PDF in my solution in which I have one PDF file named "sample.pdf". I want to open that PDF file using code inside my application. I have seen many links but could not find anything useful
Help?
Upvotes: 1
Views: 545
Reputation: 2891
You need to let the system open the file in the default viewer using LaunchFileAsync.
StorageFile file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(@"PDF\file.pdf");
Windows.System.Launcher.LaunchFileAsync(file);
Upvotes: 1