以C#编程方式显示Windows锁屏文本

13

示例截图 - Spotify 锁屏信息

在此输入图片描述

我该如何在锁屏界面上显示信息?就像Spotify一样。

编辑: 发现问题有重复,所以现在的问题是 - Spotify是如何做到的?
针对Windows 10。
使用 WPF/UWP/WinForms 或其他技术都可以。
如果只能使用其他语言或黑科技 - 总会有方法的。


我不理解负评...我试图在谷歌上搜索,但找不到任何教程或示例。 - Rhonin
@Rhonin,我也不知道。可能有很多种方法可以做到这一点,这意味着你的问题太宽泛了,或者类似于这样的东西。谁知道呢?无论如何,您需要添加相关标签,包括操作系统和版本,还有这是Winforms、WPF等吗? - derloopkat
https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/appxmanifestschema/element-lockscreen - Hans Passant
1
这是一种Live Tile。请参考https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/08/05/detailed-lock-screen-status-for-windows-10/了解更多详细信息。 - tolanj
这个对吗?https://learn.microsoft.com/zh-cn/uwp/schemas/appxpackage/appxmanifestschema/element-lockscreen, 还有一个代码示例:https://code.msdn.microsoft.com/windowsapps/Lock-screen-apps-sample-9843dc3a - Steve Drake
1个回答

11

输出:

锁屏截图

我的代码示例(按钮事件中,在应用程序启动时不会启动):

TileContent content = new TileContent()
{
    Visual = new TileVisual()
    {
        LockDetailedStatus1 = "Meeting with Thomas",
        LockDetailedStatus2 = "11:00 AM - 12:30 PM",
        LockDetailedStatus3 = "Studio F",

        TileWide = new TileBinding() { }
    }
};
var notification = new TileNotification(content.GetXml());
TileUpdateManager.CreateTileUpdaterForApplication().Update(notification);

已关注:

  1. Windows 10详细锁屏状态
  2. Windows 10本地磁贴推送快速入门

感谢评论中的帮助提供上述链接!


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接