Access UWP C# ClassLibrary from WPF

Markus Schertler 41 Reputation points
2020-04-30T07:58:00.277+00:00

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

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

Accepted answer
  1. Roy Li - MSFT 31,551 Reputation points Microsoft Vendor
    2020-05-01T02:03:53.56+00:00

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful