繁体   English   中英

如何使用 C++ 在 Windows 10 中更新动态磁贴

[英]How to update live tiles in windows 10 using c++

Windows 8.1 中的NotificationsExtensions::TileContent在 Windows 10 中不起作用。

因此,我将 TileUpdateManager 用于动态磁贴,但动态磁贴不起作用。 我正在为TileUpdateManager使用如下结构:

<tile>
    <visual  version='3'>
        <binding template='TileSquare310x310Image' branding='name'>
            <image id='1' src='ms-appx:///Assets/Tiles/310x310.png' alt='' />
        </binding>
    </visual>
</tile>

TileUpdateManager用于TileUpdateManager贴是否正确?

在 Windows 8.1 中,我可以使用什么来更新像 NotificationsExtensions::TileContent 这样的动态磁贴?

是的TileUpdateManager是在 Windows 10 中执行此操作的方法。下面是C#一个小片段

var updater = TileUpdateManager.CreateTileUpdaterForApplication();
updater.EnableNotificationQueue(true);
XmlDocument document = new XmlDocument();
document.LoadXml(content);  'content is your xml'
TileNotification notification = new TileNotification(document);
updater.Update(notification);

暂无
暂无

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

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