Can I make UWP app not gain focus after Launching

Hi 1 Reputation point
2021-09-22T13:06:32.96+00:00

Can I make UWP app not gain focus after Launching?

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 81,836 Reputation points
    2021-09-22T13:54:32.783+00:00

    On Windows 10 >= 1803, you can add for example a Page_Loaded event with

        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            IList<AppDiagnosticInfo> adi = await AppDiagnosticInfo.RequestInfoForAppAsync();
            IList<AppResourceGroupInfo> argi = adi[0].GetResourceGroups();
            await argi[0].StartSuspendAsync();
        }
    
    1 person found this answer helpful.