Beispiel #1
0
        /// <summary>
        /// Closes the popup.
        /// </summary>
        public void Close()
        {
            if (_popupRoot != null)
            {
                _popupRoot.PointerPressed -= MaybeClose;
                _topLevel.RemoveHandler(PointerPressedEvent, MaybeClose);
                _topLevel.Deactivated -= MaybeClose;
                _popupRoot.Hide();
            }

            IsOpen = false;
            Closed?.Invoke(this, EventArgs.Empty);
        }
Beispiel #2
0
        /// <summary>
        /// Closes the popup.
        /// </summary>
        public void Close()
        {
            if (_popupRoot != null)
            {
                if (_topLevel != null)
                {
                    _topLevel.RemoveHandler(PointerPressedEvent, PointerPressedOutside);
                    _topLevel.Deactivated -= TopLevelDeactivated;
                }

                _popupRoot.Hide();
            }

            IsOpen = false;
            Closed?.Invoke(this, EventArgs.Empty);
        }