Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if UWP-Application is in Foreground/Focused [duplicate]

Tags:

c#

windows-10

uwp

I want to check if the current application is in the foreground/focused. The application is a windows-10 UWP application.

What i already got is, to check if the current application is minimized. For that i use the VisibilityChanged event of Window.Current.

But i don´t find a solution, to detect if the application is in foreground or not.

like image 735
TheTanic Avatar asked Jan 18 '16 15:01

TheTanic


Video Answer


1 Answers

I can't be 100% sure but it seems that Windows.UI.Xaml.Window.Activated event should suit your needs.

like image 111
Alex Avatar answered Sep 28 '22 13:09

Alex