This is a migrated thread and some comments may be shown as answers.

Binding hubtile to images loaded after xaml page loads

4 Answers 53 Views
HubTile for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
SelAromDotNet
Top achievements
Rank 2
SelAromDotNet asked on 22 Jan 2014, 03:43 AM
I have a collection of items, each of which has a collection of images.

the main collection loads when the xaml page loads, then a timer loads the images asynchronously for each item.

I cannot seem to get the hubtile to display the images when they are loaded.

If I go into the item then come back to the main page, all of the images have been loaded and the hubtile loads.

I also used a loaded event to remove the main item and re-add it to the collection, which makes the hubtile work, since it has the images loaded... but this is not ideal.

is it possible to tell the hubtile to "refresh" when the images in each of the items have been loaded?

thanks!

4 Answers, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 24 Jan 2014, 11:46 AM
Hello Josh,

Thank you for contacting us,

If I understand you correctly, the problem might be that the hub tile does not know that its picture collection has been updated. To fix this, you can use an ObservableCollection for the images and the hub tile will automatically know when a new image is added. I have attached a sample application that demonstrates a scenario where I add images asynchronously - you can click the "add images" button and wait until the images start to appear.

I hope this works. Let us know if you have further questions.

Regards,
Rositsa Topchiyska
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
SelAromDotNet
Top achievements
Rank 2
answered on 12 Feb 2014, 08:11 AM
thank you for the sample, but I'm unfortunately unable to run it because my version of xaml controls is older and my subscription has expired :(

but if possible can you answer these questions:

1) the sample given is for Windows 8.1, my app is running Windows 8.0, could this be a limitation?
2) my version on xaml controls is 2013.2.716.0, is it possible this was not working in that version?

If yes to either of these I don't have to waste my time trying to figure it out, and will wait until I can renew my subscription...

otherwise it has to be a bug in my code. thanks!
0
Rosy Topchiyska
Telerik team
answered on 13 Feb 2014, 05:25 PM
Hello Josh,

I have attached a 8.0 version of the project that refers the 2013.2.716 version of the controls. The application runs as expected. Please, take a look and let us know if you have further questions.

Regards,
Rositsa Topchiyska
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

0
SelAromDotNet
Top achievements
Rank 2
answered on 14 Feb 2014, 11:52 PM
thank you kindly for taking the time to do this, and for including the trial binaries so I could run it right away!

I confirm your project works, and looking at my code I'm not doing anything different, doing images.Add() to the observable collection to which the HubTile is bound...

the only thing I see different is that I'm using remote images, but I tested your project by changing it to point to a http link to an image and it worked!!

so something has to be wrong with my project, at least I know it is supposed to work. thank you for your help!
Tags
HubTile for XAML
Asked by
SelAromDotNet
Top achievements
Rank 2
Answers by
Rosy Topchiyska
Telerik team
SelAromDotNet
Top achievements
Rank 2
Share this question
or