【发布时间】:2016-08-06 08:55:48
【问题描述】:
这是我的代码:
Uri u = new Uri(@"C:\roomieUser\w3.tif");
Windows.System.UserProfile.LockScreen.RequestSetImageFeedAsync(u);
我正在尝试更改 Windows 窗体应用程序中的锁定屏幕。我已经设法在 Windows 窗体应用程序中使用 WinRT 库,有两种方法可以改变图片,一种是上面写的,另一种如下所示
LockScreen.SetImageFileAsync(); //But it requires IStorageFile passed in method
我有图片存储在“资源”文件夹中,有什么方法可以将这些图片转换/使用为IStorageFile?
文件路径是正确的,但是当我尝试运行它时会显示一条错误消息
未找到元素。 (HRESULT 异常:0x80070490)
【问题讨论】:
标签: c# windows-runtime lockscreen