Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
199 views
in Technique[技术] by (71.8m points)

c# - UWP UI with background service

I have been browsing for days now trying to find an answer. So what exactly I want to achieve:

I want to make a service that will always run on the user's system. Start on start-up and stop on system shutdown. No UI, no nothing. Now this service might need some configuration. So I want UWP to be the front end UI to be the one the user has to use in order to configure it, since its more modern looking and can use gamepad input in to navigate which is a feature I really want.

I found quite a few sources that one can start a background service after launching the UWP UI first. I don't want that. On start-up I don't want any UI to pop up. Just the service starting in the background and whenever the user wants (the service is monitoring user input) can press the shortcut key (which can assign via the UI) and launch the UI settings UWP window. There can also be different UWP windows and not only settings, for example a quick launch window where the user can launch by pressing the configured shortcut key and choose via the UWP window which app they want to launch.

What I have right now: A WPF app that hides all its windows on startup, so the app keeps on going, monitoring user input. So when the user presses a shortcut key it shows the desired window. But it is with WPF not providing me the UI look I'd like to (and no gamepad navigation), and I'm not so sure how much of a good practice this way is.

So long story short:

Background Service always running

UWP UI only appear when the user presses the configured shortcut key

Hopefully, I'm clear enough. Please ask for any clarifications you might need.

question from:https://stackoverflow.com/questions/65643868/uwp-ui-with-background-service

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...