Ejemplo n.º 1
0
        protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                if (_shellSection != null)
                {
                    ((IShellSectionController)_shellSection).RemoveContentInsetObserver(this);
                    _shellSection = null;
                }

                Element.PropertyChanged -= OnHandlePropertyChanged;
                Platform.SetRenderer(Element, null);
                if (_appeared)
                {
                    Page.SendDisappearing();
                }

                _appeared = false;

                if (_events != null)
                {
                    _events.Dispose();
                    _events = null;
                }

                if (_packager != null)
                {
                    _packager.Dispose();
                    _packager = null;
                }

                if (_tracker != null)
                {
                    _tracker.Dispose();
                    _tracker = null;
                }

                Element = null;
                Container?.Dispose();
                _pageContainer = null;
            }

            _disposed = true;

            base.Dispose(disposing);
        }
Ejemplo n.º 2
0
        public override void LoadView()
        {
            //by default use the MainScreen Bounds so Effects can access the Container size
            if (_pageContainer == null)
            {
                _pageContainer = new PageContainer(this)
                {
                    Frame = UIScreen.MainScreen.Bounds
                }
            }
            ;

            View = _pageContainer;
        }