Hi Greg.
The sample is very simple:
- I have a page in which I put a C1PdfViewer
<C1:C1PdfViewer x:Name="pdfViewer" Grid.Row="1" Xaml:C1NagScreen.Nag="True" />
- in code behind
protected async override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState) { StorageFile f = await ApplicationData.Current.LocalFolder.GetFileAsync("C1XapOptimizer.pdf"); await pdfViewer.LoadDocumentAsync(await f.OpenStreamForReadAsync()); }
- In the local folder i put C1XapOptimizer.pdf (taken from your samples)
The exact same code is in my app and in a very simple app I wrote to try to understan the problem
- In my app, when I navigate to the page, I see the MessageDialog about the trial version, the pdf isn’t loaded and from Visual Studio I see on the output:
"A first chance exception of type 'System.NullReferenceException’ occurred in C1.Xaml.DLL"
- In the little app, the first time I ran it, the behavior has been the same. From the second time the pdf is loaded and I dont’ get the message on the output about the exception.
I use Visual Studio Premium 2012 with update 3.
Both apps are tested in Debug mode (x86). If you need more informations please tell me.
Thanks, Daniele