New Live tiles don't work in Windows Phone Silverlight 8.1 apps?

瘦欲@ 提交于 2020-02-02 03:08:13

问题


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

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);

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

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


回答1:


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.

More information here: http://msdn.microsoft.com/en-us/library/dn642085(v=vs.105).aspx



来源:https://stackoverflow.com/questions/23589479/new-live-tiles-dont-work-in-windows-phone-silverlight-8-1-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!