Tombstoning also saves page state?

Mar 17, 2012 at 2:34 AM

I know tombstoning into catel can automatically save all properties of a view model but can it also save certain states of UI controls. For example:

 

 

If there is a pivot on a page and  the third pivot is selected..... does catel have the ability to put the user back on the third pivot item when recovering from tombstoning?

Coordinator
Mar 17, 2012 at 7:16 AM

Catel does nothing specific to view tombstoning. However, I am currently writing a WP7 app with Catel, and when I use the back-button, it automatically selects the previously selected page in a panorama view. So, this gives me good hope that tombstoning will do the same, but haven't tried it yet.

Will definitely investigate this.

Coordinator
Mar 17, 2012 at 10:02 AM

ok, quickly took a look, the view state is indeed not saved. We have to think about the implementation, because we cannot write custom code for each control. We must think of a better approach. For now, I have added the following events:

        public event EventHandler<EventArgs> Tombstoning;
        public event EventHandler<EventArgs> Tombstoned;
        public event EventHandler<EventArgs> RecoveringFromTombstoning;
        public event EventHandler<EventArgs> RecoveredFromTombstoning;

I will also create overloads on the PhoneApplicationPage so you can easily handle your custom code for the view.