I want to be able to prevent the screen saver from triggering while my app is in use by using the DisplayRequest class, but I only want to do this while it\'s the active app
It's actually quite simple:
Window.Current.Activated += Current_Activated; private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e) { if (e.WindowActivationState == CoreWindowActivationState.Deactivated) { // do stuff } else { // do different stuff } }