How to Disable UWP App Suspension?

前端 未结 5 574
滥情空心
滥情空心 2021-01-18 22:03

I am using C# to develop a UWP app for Windows 10 running only on desktop computers, targeting platform version 10.0.14393.0. Due to business requirements, the app lifecycle

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-18 22:27

    I was trying to solve this for days and days but then found this link. Very good explanation and solution to this and most importantly.. easy to understand. You need to put the code in the app.xaml.cs and also edit the package manifest file. You will also need the following directives in the app.xaml.cs

    using Windows.ApplicationModel.ExtendedExecution.Foreground; using System.Threading.Tasks;

    non-suspending-uwp

提交回复
热议问题