Conductor: Pivot Restore from Tombstone

Topics: Bugs
Sep 13, 2011 at 12:00 PM

Hi Guys,

What is the correct way to restore a Conductor from Tombstone. More specifically,


1. I am using a Conductor as my MainPageViewModel (Pivot control) and have created a MainPageViewModelStorage to manage the storage of the ActiveItemIndex.

2. I then navigate to a page after clicking a List Item.

3.  I tombstone the application (using emulator window button).

4.  I restore the application using the back button.

5. I get an Argument Out of Exception (Index) because the Items in the conductor (PivotPages) have not yet been created. The conductor constructor is called but I have determined that the OnInitialize is not called.



Sep 15, 2011 at 4:25 PM

your MainPageViewModelStorage derives from MainPageViewModel but its not storing correctly the activeitemindex....  Is the below snippent close to what you have?  I assume that the index is something you created to store the index of the pivot?


public class MainpageViewModelStorage : StorageHandler<MainPageViewModel>

     public override void Configure(){


             Property(x => x.ActiveItemIndex).InPhoneSettings().RestoreAfterViewLoad();


Sep 16, 2011 at 8:52 AM

Hi Mvermef,

Actually, I only have the following - 




Sep 17, 2011 at 1:55 AM
Edited Sep 17, 2011 at 1:56 AM

it needs to be in the format I posted as well as store everything you think is necessary for the page / pivot etc to store and restore accordingly.

Your getting the error cause the Items collection is probably empty with the Conductor.