Binding to this property is causing the entire application to hang. No error generated, the app just... stops.
I'm fairly new to development for Windows 8 Store Apps, so it very well could be something I'm doing, however, the property I'm binding against gets the StorageFile in a reasonable time (and the file I'm attempting this with is not very large), however, after I return the StorageFile, everything hangs.
The control does reside in a LayoutAwarePage, and it's XAML looks as follows:
<sync:SfPdfViewerControl ItemsSource="{Binding Document}" Name="myPdf" Height="800" Width="560" Margin="0,20,0,10"></sync:SfPdfViewerControl>
And here is the relevant code that populates the Document property of the model:
private StorageFile _doc = null;
public StorageFile Document
{
get
{
if (this._doc == null)
{
this._doc = GetDoc().Result;
}
return this._doc;
}
}
private async Task<StorageFile> GetDoc()
{
StorageFolder installFolder = Windows.ApplicationModel.Package.Current.InstalledLocation;
var file = await installFolder.GetFileAsync(@"Assets\Pdfs\Truck.pdf");
return file;
}
Any suggestions/ideas?
I go to navigate to the page, and my details page doesn't even display. It just sits there, doing, well, nothing. Cannot interact with the app at all.
Thanks,
Derek