It crashes every time you tap in an item in a GridView and it’s funny,
Looks like there’s a bug in the GridView and after it’s assigned to a populated DataContext it needs to be refreshed before it accepts Taps, even though it works fine with Clicks.
There’s no way
- Fast loading dashboards: I am preloading the contents of the fast loading dashboards once the app is executed. Doing this I get all of the GridViews populated in a page that is not being displayed to the users, in the background. Once the page where the GridView is selected by the user it’s rendered along with the GridView object refreshing it.
- Slow loading dashboards: I am preloading the contents on this dashboards too but if the user clicks them right after the app loads they will still be loading causing the GridView to render just once after the DataContext is populated. In this cases I have changed the behaviour of the dashboard and I’m assigning the DataContext before and updating it several times, once every new chunk of data is received. This way the GridView gets refreshed once per chunk of new information and the issue with the tapping is solved.
The guys at the Windows Store App Lab said they will find a proper solution to this issue but I think this is the kind of bug that will be fixed through windows update. Anyway I’ll keep you posted if they come back with something new.
***UPDATE***
A Microsoft's expert pointed out that if you create and populate the GridView in code and add it to the page it will work as expected. I've tested this and it's true.
The templates in my GridViews are complex so I'll make them user controls so I can create and populate them in code without loosing the MVVM approach.
No comments:
Post a Comment