protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;

            if (disposing)
            {
                ShellController.RemoveAppearanceObserver(this);
                Shell.PropertyChanged -= OnShellPropertyChanged;

                RemoveDrawerListener(this);
                ((IShellController)_shellContext.Shell).RemoveFlyoutBehaviorObserver(this);

                RemoveView(_content);
                RemoveView(_flyoutContent.AndroidView);

                _flyoutContent.Dispose();
            }

            base.Dispose(disposing);
        }
Exemple #2
0
        protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;

            if (disposing)
            {
                ShellController.RemoveAppearanceObserver(this);
                Shell.PropertyChanged -= OnShellPropertyChanged;

                this.DrawerClosed       -= OnDrawerClosed;
                this.DrawerSlide        -= OnDrawerSlide;
                this.DrawerOpened       -= OnDrawerOpened;
                this.DrawerStateChanged -= OnDrawerStateChanged;

                ((IShellController)_shellContext.Shell).RemoveFlyoutBehaviorObserver(this);

                RemoveView(_content);

                if (_flyoutContent != null)
                {
                    RemoveView(_flyoutContent.AndroidView);
                }

                _flyoutContent?.Dispose();
            }

            base.Dispose(disposing);
        }
Exemple #3
0
        protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;

            if (disposing)
            {
                Disconnect();

                RemoveView(_content);

                if (_flyoutContent != null)
                {
                    RemoveView(_flyoutContent.AndroidView);
                }

                _flyoutContent?.Dispose();
            }

            base.Dispose(disposing);
        }