示例#1
0
        private void HideWindow()
        {
            if (_windowCloser != null)
            {
                _windowCloser.Dispose();
                _windowCloser = null;
            }

            Hide();
        }
示例#2
0
        private void HideWindow()
        {
            if (_windowCloser != null)
            {
                _windowCloser.Dispose();
                _windowCloser = null;
            }

            _altTabAutoSwitch = false;
            Opacity           = 0;
            Dispatcher.BeginInvoke(new Action(Hide), DispatcherPriority.Input);
        }
示例#3
0
        private void HideWindow()
        {
            _windowCloser.Dispose();
            Opacity = 0;

            // Avoid flicker by delaying the "Hide" a bit. This makes sure
            // that "Opacity = 0" is taking effect before the window is hidden.
            var timer = new DispatcherTimer {
                Interval = TimeSpan.FromMilliseconds(50)
            };

            timer.Tick += (sender, args) =>
            {
                Hide();
                timer.Stop();
            };
            timer.Start();
        }