Exemple #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (NavigationController != null)
                {
                    NavigationController.PushRequested             -= OnPushRequested;
                    NavigationController.PopRequested              -= OnPopRequested;
                    NavigationController.PopToRootRequested        -= OnPopToRootRequested;
                    NavigationController.RemovePageRequested       -= OnRemovedPageRequested;
                    NavigationController.InsertPageBeforeRequested -= OnInsertPageBeforeRequested;
                }

                _toolbarTracker = null;

                if (_currentPage != null)
                {
                    _currentPage.PropertyChanged -= OnCurrentPagePropertyChanged;
                    _currentPage = null;
                }
                if (_currentStack != null)
                {
                    _currentStack.ForEach(s => s.Dispose());
                    _currentStack = null;
                }
            }

            base.Dispose(disposing);
        }
Exemple #2
0
 public NavigationPageRenderer()
 {
     _currentStack   = new FormsStack <NavigationChildPage>();
     _toolbarTracker = new GtkToolbarTracker();
 }