private void HideWindow() { if (_windowCloser != null) { _windowCloser.Dispose(); _windowCloser = null; } Hide(); }
private void HideWindow() { if (_windowCloser != null) { _windowCloser.Dispose(); _windowCloser = null; } _altTabAutoSwitch = false; Opacity = 0; Dispatcher.BeginInvoke(new Action(Hide), DispatcherPriority.Input); }
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(); }