Automatic State Preservation Inner Workings
This section looks at how the state preservation system works behind the scenes. You see how properties decorated with the
Stateful attribute are identified and how delegates for property accessors are created to store and retrieve property value. You also see how a custom
ViewState class is used to load and save state via the
The following sections are advanced in nature. Feel free to skip ahead. If you choose to use the custom state preservation system, you may return to this chapter at a later time.
Identifying Stateful ViewModels
IStatePreservation interface is implemented by viewmodels that want to save and restore state. If a viewmodel implements