I want to save PDF file to the Isolated Storage of Windows Phone and retrive it from Isolated Storage and show it in Windows phone app screen, not use launcher.
So as per Google result I found link and as specified on the link I followed the steps and written below code but getting error as mentioned below.
private void saveloadpdf()
{
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
using (var stream = new IsolatedStorageFileStream("C1XapOptimizer.pdf", FileMode.Create, FileAccess.Write, store))
{
c1PdfViewer1.SaveDocument(stream);
}
}
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
using (var stream = new IsolatedStorageFileStream("C1XapOptimizer.pdf", FileMode.OpenOrCreate, FileAccess.Read, store))
{
c1PdfViewer1.LoadDocument(stream);
}
}
It's showing the below error
"{Error 1 'C1.Phone.PdfViewer.C1PdfViewer' does not contain a definition for 'SaveDocument' and no extension method 'SaveDocument' accepting a first argument of type 'C1.Phone.PdfViewer.C1PdfViewer' could be found (are you missing a using directive or an assembly reference?) C:\Users\Aditya\Documents\Visual Studio 2013\Projects\Media\Media\MainPage.xaml.cs 116 34 Media"
How I can solve the problem? I want to store file in Isolated Storage and retrieve from there, it's requirement of my app (don't ask me why I am saving the PDF to Isolated Storage).