private void OnPushed(object sender, NavigationEventArgs args)
        {
            var bringToFront = _bringToFront;

            _bringToFront = false;
            RaiseNavigated(args.Page, args.Page.GetNavigationParameter() as string, bringToFront ? NavigationMode.Refresh : NavigationMode.New);
        }
Example #2
0
		async void MasterViewModelOnPageSelectionChanged (object sender, NavigationEventArgs eventArgs)
		{
			Debug.WriteLine ("MasterViewModelOnPageSelectionChanged");
			IsPresented = false;
			var page = eventArgs.Page;
			await Detail.Navigation.PushAsync (page, true);
		}
 private void Element_Popped(object sender, NavigationEventArgs e) {
     if(this.Element.Navigation.NavigationStack.Count == 1) {
         var root = this.ContainerElement.GetRootPage();
         root.FindChildControl<ToggleButton>("backToggle").Visibility = Windows.UI.Xaml.Visibility.Collapsed;
         root.FindChildControl<ToggleButton>("splitViewToggle").Visibility = Windows.UI.Xaml.Visibility.Visible;
     }
 }
Example #4
0
        private static void NavigationPageOnPushed(object sender, NavigationEventArgs navigationEventArgs)
        {
            var page = navigationEventArgs.Page;
            var vm = page.BindingContext;

            MessagingCenter.Send<VmPageMappings>(new VmPageMappings(), string.Format(Constants.Navigation.PageNavigated, vm.GetType()));
        }
 private void OnPagePopped(object s, NavigationEventArgs e)
 {
     if (e.Page == page)
     {
         this.Dispose(true);
         navigPage.Popped -= OnPagePopped;
     }
 }
Example #6
0
        private void OnPushed(object sender, NavigationEventArgs args)
        {
            var handler = Navigated;

            if (handler != null)
            {
                handler(this, new Models.EventArg.NavigationEventArgs(args.Page, args.Page.GetNavigationParameter(), NavigationMode.New));
            }
        }
        private void NavigationPageOnNavigated(object sender, NavigationEventArgs navigationEventArgs,
            NavigationEventType type)
        {
            this.masterDetailPage.IsPresented = false;
            var currentPage = ((NavigationPage) sender).CurrentPage;
            ((MenuViewModel)this.menuPage.BindingContext).OnNavigated(currentPage);

            (currentPage.BindingContext as INavigatedToAware)?.OnNavigatedTo(type);
        }
Example #8
0
        private void OnPopped(object sender, NavigationEventArgs args)
        {
            var handler = Navigated;

            if (handler != null)
            {
                var page = CurrentContent as Page;
                handler(this, new Models.EventArg.NavigationEventArgs(CurrentContent, page.GetNavigationParameter(), NavigationMode.Back));
            }
        }
        private void NavigationPage_PoppedToRoot(object sender, Xamarin.Forms.NavigationEventArgs e)
        {
            if (e.Page is IPageNavigation)
            {
                ((IPageNavigation)e.Page).OnNavigatedFrom(new NavigationEventArgs(e.Page, NavigationMode.Back));
            }

            if (this.Navigation.NavigationStack.Count > 0)
            {
                if (this.Navigation.NavigationStack[0] is IPageNavigation)
                {
                    ((IPageNavigation)this.Navigation.NavigationStack[0]).OnNavigatedTo(new NavigationEventArgs(e.Page, NavigationMode.Back));
                }
            }
        }
        private void NavigationPage_Popped(object sender, Xamarin.Forms.NavigationEventArgs e)
        {
            Page newTopPage = Navigation.NavigationStack[Navigation.NavigationStack.Count - 1];

            if (Device.OS == TargetPlatform.iOS)
            {
                newTopPage = Navigation.NavigationStack[Navigation.NavigationStack.Count - 2];
            }
            if (e.Page is IPageNavigation)
            {
                ((IPageNavigation)e.Page).OnNavigatedFrom(new NavigationEventArgs(newTopPage, NavigationMode.Back));
            }

            if (this.Navigation.NavigationStack.Count > 0)
            {
                if (newTopPage is IPageNavigation)
                {
                    ((IPageNavigation)newTopPage).OnNavigatedTo(new NavigationEventArgs(e.Page, NavigationMode.Back));
                }
            }
        }
        private async void NavigationPage_Pushed(object sender, Xamarin.Forms.NavigationEventArgs e)
        {
            Page previousPage = Navigation.NavigationStack[0];

            if (Navigation.NavigationStack.Count > 2)
            {
                previousPage = Navigation.NavigationStack[Navigation.NavigationStack.Count - 2];
            }

            if (previousPage != null)
            {
                if (previousPage is IPageNavigation)
                {
                    ((IPageNavigation)previousPage).OnNavigatedFrom(new NavigationEventArgs(e.Page, NavigationMode.New));
                }
            }

            if (e.Page is IPageNavigation)
            {
                ((IPageNavigation)e.Page).OnNavigatedTo(new NavigationEventArgs(previousPage, NavigationMode.New));
            }
        }
 private void OnPushed(object sender, NavigationEventArgs args)
 {
     RaiseNavigated(args.Page, args.Page.GetNavigationParameter(), args.Page.GetBringToFront() ? NavigationMode.Refresh : NavigationMode.New, args.Page.GetNavigationContext(false, true));
 }
 private void OnPopped(object sender, NavigationEventArgs args)
 {
     RaiseNavigated(CurrentContent, CurrentContent.GetNavigationParameter(), NavigationMode.Back, CurrentContent.GetNavigationContext(true, true));
 }
 private void Element_Pushed(object sender, NavigationEventArgs e) {
     //backToggle
     var root = this.ContainerElement.GetRootPage();
     root.FindChildControl<ToggleButton>("backToggle").Visibility = Windows.UI.Xaml.Visibility.Visible;
     root.FindChildControl<ToggleButton>("splitViewToggle").Visibility = Windows.UI.Xaml.Visibility.Collapsed;
 }
 private void HandleNavigationPushed(object sender, NavigationEventArgs e)
 {
     var canNavigateBack = ((NavigationPage)sender).Navigation.NavigationStack.Count > 1;
     this.UpdateHomeAsUpIndicator(canNavigateBack);
 }
 private void OnNavigation(Object sender, NavigationEventArgs e)
 {
     Navigation.UpdateToolbarItems();
 }
		private void HandlePopped(object sender, NavigationEventArgs e)
		{
			var item = NavigationBar.Items.Last();

			if (((ExtendedNavigationPage)Element).ShowBackButton)
			{
				if (leftIconBarButtonItem == null)
				{
					CreateBackButton();
				}

				item.LeftItemsSupplementBackButton = false;
				item.LeftBarButtonItem = leftIconBarButtonItem;
			}
		}
 private void OnPopped(object sender, NavigationEventArgs args)
 {
     var page = CurrentContent as Page;
     RaiseNavigated(CurrentContent, page.GetNavigationParameter(), NavigationMode.Back);
 }
 private void OnPushed(object sender, NavigationEventArgs args)
 {
     var bringToFront = _bringToFront;
     _bringToFront = false;
     RaiseNavigated(args.Page, args.Page.GetNavigationParameter() as string, bringToFront ? NavigationMode.Refresh : NavigationMode.New);
 }
 private void CustomNavigationPage_Pushed(object sender, NavigationEventArgs e)
 {
     //page added to view, so check if we need to subscribe.
     HandleEvent(e.Page, true);
 }
 private void CustomNavigationPage_Popped(object sender, NavigationEventArgs e)
 {
     //page removed from view, so check if we need to unsubscribe.
     HandleEvent(e.Page, false);
 }
Example #22
0
 private void OnPushed(object sender, NavigationEventArgs args)
 {
     RaiseNavigated(args.Page, args.Page.GetNavigationParameter() as string, NavigationMode.New);
 }
Example #23
0
 void navPage_Pushed(object sender, NavigationEventArgs e)
 {
     Debug.WriteLine("Page popped {0}", e.Page.Title);
 }
 private void OnPushed(object sender, NavigationEventArgs args)
 {
     RaiseNavigated(args.Page, args.Page.GetNavigationParameter(), NavigationMode.New);
 }
 private static void PagePopped(object sender, NavigationEventArgs e)
 {
     DisposePage(e.Page as IDisposable);
 }
 /// <summary>
 /// Method called when a page is popped off the Navigation stack,
 /// or when we pop to root.
 /// </summary>
 /// <param name="sender">NavigationPage</param>
 /// <param name="e">Details</param>
 void OnPagePopped(object sender, Xamarin.Forms.NavigationEventArgs e)
 {
     NavigatedBack?.Invoke(this, EventArgs.Empty);
 }
 void _rootNavigationPage_Pushed(object sender, NavigationEventArgs e)
 {
     _synchroniseNavigation(NavigationDirection.Forward);
 }
Example #28
0
        private void OnPopped(object sender, NavigationEventArgs args)
        {
            var page = CurrentContent as Page;

            RaiseNavigated(CurrentContent, page.GetNavigationParameter() as string, NavigationMode.Back);
        }
 void _rootNavigationPage_PoppedToRoot(object sender, NavigationEventArgs e)
 {
     _popRoot();
 }
 private void HandleNavigationPoppedToRoot(object sender, NavigationEventArgs e)
 {
     this.UpdateHomeAsUpIndicator(false);
 }
 void _rootNavigationPage_Popped(object sender, NavigationEventArgs e)
 {
     _synchroniseNavigation(NavigationDirection.Back);
 }
        private void OnPagePopped(object s, NavigationEventArgs e)
        {
            return;
            if (e.Page == page) {
                var androidMapView2 = (MapView)Control;

                androidMapView2.Map.Clear ();
                androidMapView2.Map.Dispose ();

                androidMapView2 = null;
                this.Dispose (true);
                navPage.Popped -= OnPagePopped;

                page = null;
                navPage = null;

                GC.Collect (1);
            }
        }
		/// <summary>
		/// Handles the popped to root.
		/// </summary>
		/// <param name="sender">Sender of event.</param>
		/// <param name="e">Navigation event arguments.</param>
		private void HandlePoppedToRoot(object sender, NavigationEventArgs e)
		{
			lock (syncRoot)
			{
				transition = false;
			}
		}