本文介绍了新的Live磁贴在Windows Phone Silverlight 8.1应用程序中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以当我观看来自BUILD的视频时,我认为这会很容易...

So when I was watching this video from BUILD I thought it's gonna be easy...

但是我似乎无法通过执行以下操作来更改WP Silverlight 8.1应用程序的图块.

But I can't seem to get the tile of my WP Silverlight 8.1 app to change by doing the following.

    const string xml = "<tile>"
           + "<visual>"
           + "<binding template='TileSquareText01'>"
           + "<text id='1'>testing 123</text>"
           + "</binding>  "
           + "</visual>"
           + "</tile>";

    var xmlDoc = new XmlDocument();
    xmlDoc.LoadXml(xml);

    var tileNotification = new TileNotification(xmlDoc);
    TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);

请注意,我还用完全相同的代码创建了Windows RunTime Windows Phone 8.1,并且工作正常.

Please note I've also created a Windows RunTime Windows Phone 8.1 with exactly the same code and it works just fine.

在msdn上,它明确指出 TileUpdateManager 支持Windows Phone Silverlight 8.1.所以我真的不知道这里缺少什么.

On msdn, it clearly states that TileUpdateManager supports Windows Phone Silverlight 8.1. So I don't really know what's missing here.

推荐答案

在清单中,确保通知类型设置为WNS.如果将其设置为MPNS,则必须使用旧的通知.

In your manifest, make sure the notification type is set to WNS. If you set it to MPNS, then you have to use notifications the old way.

此处的更多信息: http://msdn.microsoft.com/zh-CN/library/dn642085(v=vs.105).aspx

这篇关于新的Live磁贴在Windows Phone Silverlight 8.1应用程序中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 22:31