New Live tiles don't work in Windows Phone Sil

2019-04-29 19:56发布

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

enter image description here

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条回答
Ridiculous、
2楼-- · 2019-04-29 20:39

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

查看更多
登录 后发表回答