Exrin VisualState LifeCycle

46 Views Asked by At

I have properties on my VisualState that I set their value on the Init method on the VisualState from my WebApi. When I navigate to this page to press back to return to this this page the Init method is not called again. How can I update the VisualState every time the page appears if by navigate on back button press, I'm thinking about using the on OnNavigated method on the viewmodel and set the visuelstate properties from there. Should I do it, or there is another way?

1

There are 1 best solutions below

0
On BEST ANSWER

If you want to do something, every time the View appears, you would use this override in the ViewModel.

OnAppearing

If you want it to run, only the first time it is view, then you use

OnNavigated