コード例 #1
0
ファイル: PageRenderer.cs プロジェクト: redjaguar/maui
        void IDisconnectable.Disconnect()
        {
            if (_shellSection != null)
            {
                ((IShellSectionController)_shellSection).RemoveContentInsetObserver(this);
                _shellSection = null;
            }

            if (Element != null)
            {
                Element.PropertyChanged -= OnHandlePropertyChanged;
                Platform.SetRenderer(Element, null);

                if (_appeared)
                {
                    Page.SendDisappearing();
                }

                Element = null;
            }

            _events?.Disconnect();
            _packager?.Disconnect();
            _tracker?.Disconnect();
        }
コード例 #2
0
ファイル: PageRenderer.cs プロジェクト: lhx11187/maui
        void IDisconnectable.Disconnect()
        {
            if (_shellSection != null)
            {
                ((IShellSectionController)_shellSection).RemoveContentInsetObserver(this);
                _shellSection = null;
            }

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

            (_pageLifecycleManager as IDisconnectable)?.Disconnect();
            _events?.Disconnect();
            _packager?.Disconnect();
            _tracker?.Disconnect();
        }