question

MarkusSchertler-2646 avatar image
0 Votes"
MarkusSchertler-2646 asked ·

Access UWP C# ClassLibrary from WPF

Hello,

i have a UWP C# Desktop Application with two UWP Class Libraries. Now i need a Data Application for this which runs unlimited. Which can not be suspended like an UWP Application.

I thought to code this in WPF. But this Application needs access to the classes and the code in the UWP Class Libraries. Is this possible and how exactly? Or must i convert the UWP Class Libraries in .Net Standard Libraries to use them from UWP and from WPF?

The alternative would be to code the Data Application in UWP if it is possible to ensure that it is not suspended from Windows. Is this possible and how?

Thank you
Markus

windows-uwp
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RoyLi-MSFT avatar image
0 Votes"
RoyLi-MSFT answered ·

Hello,

Welcome to Microsoft Q&A!


>>Now i need a Data Application for this which runs unlimited. Which can not be suspended like an UWP Application.

Maybe you don't need to write it in WPF, since Windows Creators Update (version 1703), UWP apps could run in the background indefinitely. So you can implement it in a UWP way.

  • The first approach is that your UWP app could run while it is minimized with extended execution.

  • The second is that you could make the background task of your app run in the background indefinitely with the extendedBackgroundTaskTime restricted capability.

Please note both of the solutions only work for sideloading apps.

For more information, please refer to this document: Run in the background indefinitely.



Thank you.



·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.