janbaer
4/18/2013 - 10:30 AM

Detect the active window in an WPF application

Detect the active window in an WPF application

Application.Current.Windows.OfType<Window>().SingleOrDefault(x => x.IsActive);