BaconographyWP8.View.MessagingPageView.OnNavigatedTo C# (CSharp) Method

OnNavigatedTo() protected method

protected OnNavigatedTo ( System.Windows.Navigation.NavigationEventArgs e ) : void
e System.Windows.Navigation.NavigationEventArgs
return void
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var vm = this.DataContext as MessagesViewModel;
            if (vm != null)
            {
                if (vm.HasMail)
                    pivot.SelectedIndex = 0;

                if (e.Uri.ToString().Contains("?refresh"))
                {
                    pivot.SelectedIndex = 0;
                    vm.RefreshMessages.Execute(vm);
                }
            }
            UpdateMenuItems();
            base.OnNavigatedTo(e);
        }