BaconographyWP8.View.ComposePostPageView.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)
        {   
            if (e.NavigationMode == System.Windows.Navigation.NavigationMode.Back)
            {
                var vm = this.DataContext as ComposePostViewModel;
                if (vm != null)
                {
                    
                    vm.RefreshUser.Execute(null);
                }
            }
            else if (e.NavigationMode == NavigationMode.New)
            {
                var vm = this.DataContext as ComposePostViewModel;
                if (vm.Editing)
                {
                    pivot.Title = "BACONOGRAPHY > EDIT POST";
                    TitleBox.SetValue(Grid.RowProperty, 0);
                    TextInput.SetValue(Grid.RowProperty, 1);
                    TextInput.SetValue(Grid.RowSpanProperty, 3);
                }
                else
                {
                    pivot.Title = "BACONOGRAPHY > SUBMIT POST";
                    TitleBox.SetValue(Grid.RowProperty, 2);
                    TextInput.SetValue(Grid.RowProperty, 3);
                    TextInput.SetValue(Grid.RowSpanProperty, 1);
                }
            }
            UpdateMenuItems();
            base.OnNavigatedTo(e);
        }