mardi 24 février 2015

PivotItem in Hub application - loaded event

I'm developing an Windows Phone 8.1 app with Hub template, where on first page is Pivot control with 4 PivotItems.

Idea is that after app launch WebRequest function will be called and overwrites items(images sources embedded into app) inside PivotControl(all PivotItems).

I have a problem with loaded event for PivotItems - it fires only when user swipe to that PivotItem. So if I swipe through all 4 PivotItems and then I call my web function, everything is fine. If I call that function before I swipe through all PivotItems, function will throw NullReferenceException, because PivotItems2-4 are not loaded(PivotItem1 is fine everytime).

How to force load all PivotItems and theirs children?

Thank you.

Best regards,

Marian


Aucun commentaire:

Enregistrer un commentaire