Tombstoning also saves page state?

Mar 17, 2012 at 3: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?

Mar 17, 2012 at 8: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.

Mar 17, 2012 at 11: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.