[#2] WP7Tips: Come faccio a tornare alla pagina corrente del Pivot durante il Tombstoning

Share on:

Questo post è complementare al precedente riguardante il Panorama.

In questo caso è ancora più semplice perchè nel Pivot la proprietà SelectedIndex è read/write ![Smile](http://www.geniodelmale.info/dexterimages/www_geniodelmale_info//Lorenzo Barbieri/wlEmoticon-smile_2_21.png):

protected override void OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs e)        {            this.State["Pivot"] = this.pivot.SelectedIndex;            base.OnNavigatingFrom(e);        }         protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)        {            if (this.State.ContainsKey("Pivot"))                this.pivot.SelectedIndex = (int)this.State["Pivot"];            base.OnNavigatedTo(e);        }

Post originale