Пример #1
0
        public static void Block(string message)
        {
            StatusBarHelper.ShowStatus(message);

            if (_popup != null)
            {
                return;
            }

            const double opacity = 255 * 0.8;

            var size = Window.Current.Bounds;
            var grid = new Grid()
            {
                Width      = size.Width,
                Height     = size.Height,
                Background = new SolidColorBrush(Color.FromArgb(Convert.ToByte(opacity), 0x0, 0x0, 0x0))
            };

            _popup = new Popup()
            {
                Child  = grid,
                IsOpen = true
            };
            BlockNavigation();
        }
Пример #2
0
        public static void Unblock()
        {
            SupressBackEvents = false;

            if (_commandBar != null)
            {
                _commandBar.Visibility = _commandPrevVisibility;
                _commandBar            = null;
            }

            if (_popup == null)
            {
                return;
            }

            _popup.IsOpen = false;
            _popup        = null;
            StatusBarHelper.HideStatus();
        }