Metro App Tile Notification
The code in the original post works pretty much the same in the RTM version but I did run into one odd problem. In my original post I used the following line of code to get the XML node from the tile template:
var textNode = xmlTemplate.SelectSingleNode("/title/visual/binding/text[@id='1']");
In the RTM this doesn’t work, the node is not be found. It turns out that this is the expected behavior since the SelectSingleNode method required the XML to have a namespace, otherwise it won’t find the node. I am not sure why this worked in the developer preview. There are ways to get around the missing namespace, but there is an easier solution:
var textNode = xmlTemplate.GetElementsByTagName("text")[0];
This line achieves the same thing and doesn’t have the namespace issue. Other then this change everything in the original post works fine.
0 Komentar