c# - Refreshing interface in Windows Phone when reactivating -
in first wp7 app, have resolved (with mvvm pattern) except recovering app inactivity. have main screen list of database ítems , field each 1 that, depending on value , actual day, shows 1 value or (not calendar, same problem).
if user goes home and, next day, resumes app, calcs must done again, refresh contents. also, in second screen happens same: shows depends on day is.
how can detect activation (i know on application_activated function, don't know how use it) , refresh need (a refreshinterface function in second screen, if user leave app there, , main list in main screen).
i don't need save nothing in deactivation, refresh data on activation only.
in page's onnavigatedto method can subscribe application.activated event (don't forget unsubscribe in onnavigatedfrom). in event handler can update viewmodel.
Comments
Post a Comment