WinPhone accessing local file

72 views Asked by At

In Windows Phone I have a PDF stored here:

ApplicationData.Current.LocalFolder / myfile.pdf

How can I open that PDF for viewing?

2

There are 2 answers

0
SD7 On BEST ANSWER

You have to use the LaunchFileAsync method of Launcher class. Example:

// Access the file.
StorageFile pdfFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("file.pdf");   
Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("file.pdf");
Windows.System.Launcher.LaunchFileAsync(pdfFile);
0
Kulasangar On

Did you try using LaunchFileAsyncto open your PDFfile?

How to open pdf file in Windows Phone 8?