简体   繁体   English

UWP应用程序,如何更改登录屏幕图像?

[英]UWP app, how change login screen image?

The Windows10 UWP APIs let you change the desktop background image and lockscreen image like so: Windows10 UWP API使您可以像这样更改桌面背景图像和锁屏图像:

// set wallpaper
UserProfilePersonalizationSettings profileSettings = UserProfilePersonalizationSettings.Current;
    if (wallpaper)
    {
        success = await profileSettings.TrySetWallpaperImageAsync(storageFile);
    } // or lockscreen
    else
    {
        success = await profileSettings.TrySetLockScreenImageAsync(storageFile);
    }

But how would one change the login screen image? 但是,如何更改登录屏幕图像?

There is no API for changing the Login Screen background image. 没有用于更改登录屏幕背景图像的API。

The image itself exists as an embedded PRI resource that cannot easily be changed (you'll need to hack the PRI file to change the image). 映像本身作为嵌入式PRI资源存在,无法轻易更改(您需要修改PRI文件才能更改映像)。

There is a Group Policy setting to hide the image and use a solid colour instead, however there is no Windows Runtime API for modifying Group Policy directly, you must change the registry settings yourself: 有一个用于隐藏图像并使用纯色的组策略设置,但是没有用于直接修改组策略的Windows运行时API,您必须自己更改注册表设置:

  1. Locate the key HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\System 找到密钥HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\System
  2. Create or set a DWORD value DisableLogonBackgroundImage to 1 . 创建或将DWORD值DisableLogonBackgroundImage设置为1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM