Skip to content

Instantly share code, notes, and snippets.

@janbaer
Created April 18, 2013 10:30
Show Gist options
  • Save janbaer/5411748 to your computer and use it in GitHub Desktop.
Save janbaer/5411748 to your computer and use it in GitHub Desktop.
Detect the active window in an WPF application
Application.Current.Windows.OfType<Window>().SingleOrDefault(x => x.IsActive);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment