We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Binding to ItemsSource in XAML

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

1 Reply

SM Suresh M Syncfusion Team April 8, 2014 10:01 AM UTC

Hi Derek ,

 

Thank you for your interest in Syncfusion products.

 

At present we do not support setting ItemSource property in XAML, however we are investigating the implementation to support ItemSupport in XAML. Please follow up the Direct trac incident 123378, for further details.

 

http://www.syncfusion.com/support/directtrac/incidents/123378

 

Please let us know if you need any further assistance.

 

Thanks,

Suresh


Loader.
Up arrow icon