Windows UWP as Screensaver?

霸气de小男生 提交于 2019-12-23 10:11:10

问题


On Windows 10, can a UWP be launched as a screensaver? If so, how do you register your app with the OS such that it gets listed in the screensaver dialog?

(Windows 8 store apps cannot be screensavers. I cannot find any information on UWPs)


回答1:


I am very sorry to disappoint you, but no, you can not set your UWP app as a screensaver provider.

What you could do instead is offering the user to give your app control of the lock screen or wallpaper image. UWP apps are able to set these images even when running in a background task with the UserProfilePersonalizationSettings class:

// Lock Screen
await UserProfilePersonalizationSettings.Current.TrySetLockScreenImageAsync(StorageFile);

// Wallpaper
await UserProfilePersonalizationSettings.Current.TrySetWallpaperImageAsync(StorageFile);


来源:https://stackoverflow.com/questions/34686041/windows-uwp-as-screensaver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!