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); }
public NavigationPageRenderer() { _currentStack = new FormsStack <NavigationChildPage>(); _toolbarTracker = new GtkToolbarTracker(); }