protected override void Dispose(bool disposing) { if (disposing) { if (BackgroundImage != null) { BackgroundImage = null; } _LeftFixedSpace.Dispose(); _RightFixedSpace.Dispose(); var source = TableView.Source as ViewSource; if (source != null) { foreach (var section in source.Sections.Values) { foreach (var listSource in section.ListSources.Values) { if (listSource != null) { listSource.Dispose(); } } } source.Dispose(); } if (_TableView != null) { _TableView.Dispose(); _TableView = null; } if (_Searchbar != null) { _Searchbar.Dispose(); _Searchbar = null; } if (RootView != null) { var disposable = RootView as IDisposable; if (disposable != null) { disposable.Dispose(); RootView = null; } } if (ToolbarButtons != null) { foreach (var button in ToolbarButtons) { button.Dispose(); } } if (NavbarButtons != null) { foreach (var button in NavbarButtons) { button.Dispose(); } } Theme.Dispose(); Theme = null; } base.Dispose(disposing); }