Wodzisław
Wodzisław

Reputation: 53

Mvvmcross for Universal Windows - why do I have to delete LoadState and SaveState

Referring to this document:

https://github.com/MvvmCross/MvvmCross/wiki/Tip-Calc-A-Universal-Windows-App-UI-Project

Why do I have to delete those functions?

How should I manage state saving and loading without them?

Upvotes: 1

Views: 169

Answers (1)

Kiliman
Kiliman

Reputation: 20312

Generally you would use the SaveState and ReloadState methods on your ViewModel. This is the cross-platform way of maintaining state.

See https://github.com/MvvmCross/MvvmCross/wiki/View-Model-Lifecycle

I use platform specific Save/Load State methods for saving UI specific data like scroll position or current tab, etc.

Upvotes: 3

Related Questions