Answered by:
A problem met in building a SDK sample

Question
-
http://code.msdn.microsoft.com/windowsapps/Basic-Tiles-Sample-805a5d7b
I have download the sample from the hyperlink above, but I found I can't update an image tile.
It doesn't work at all, does anyone have idea about it?
Monday, November 21, 2011 9:41 AM
Answers
-
Try changing this line
// get the image attributes for this template and fill them in var tileImageAttributes = tileXml.getElementsByTagName("image"); tileImageAttributes[0].setAttribute("src", "ms-resource:images/redWide.png"); tileImageAttributes[0].setAttribute("alt", "red graphic"); to this: // get the image attributes for this template and fill them in var tileImageAttributes = tileXml.getElementsByTagName("image"); tileImageAttributes[0].setAttribute("src", "ms-resource:images/redWide.scale-80.png"); tileImageAttributes[0].setAttribute("alt", "red graphic");
in default.js
Jeff Sanders (MSFT)- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, November 21, 2011 4:04 PM
- Marked as answer by Jie Bao Wednesday, December 7, 2011 9:23 AM
Monday, November 21, 2011 4:04 PMModerator -
Hi Colin,
That should do it! Note that it will restore it to its original location so if you have a lot of icons you may have missed it. Also, try shutting down your machine and then restarting it. Finally, you can uninstall it (again by right clicking on it) and see if that does it for you!
-Jeff
Jeff Sanders (MSFT)- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Wednesday, November 30, 2011 1:51 PM
- Marked as answer by Jie Bao Wednesday, December 7, 2011 9:23 AM
Tuesday, November 22, 2011 12:56 PMModerator
All replies
-
Try changing this line
// get the image attributes for this template and fill them in var tileImageAttributes = tileXml.getElementsByTagName("image"); tileImageAttributes[0].setAttribute("src", "ms-resource:images/redWide.png"); tileImageAttributes[0].setAttribute("alt", "red graphic"); to this: // get the image attributes for this template and fill them in var tileImageAttributes = tileXml.getElementsByTagName("image"); tileImageAttributes[0].setAttribute("src", "ms-resource:images/redWide.scale-80.png"); tileImageAttributes[0].setAttribute("alt", "red graphic");
in default.js
Jeff Sanders (MSFT)- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, November 21, 2011 4:04 PM
- Marked as answer by Jie Bao Wednesday, December 7, 2011 9:23 AM
Monday, November 21, 2011 4:04 PMModerator -
Thank you for your reply, but I met another problem @_@
If I unpin the tile in the start menu, I can't pin it any more.
How can I pin an application to the start menu? Right mouse click and select to pin to start menu donesn't work.Tuesday, November 22, 2011 9:46 AM -
Hi Colin,
That should do it! Note that it will restore it to its original location so if you have a lot of icons you may have missed it. Also, try shutting down your machine and then restarting it. Finally, you can uninstall it (again by right clicking on it) and see if that does it for you!
-Jeff
Jeff Sanders (MSFT)- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Wednesday, November 30, 2011 1:51 PM
- Marked as answer by Jie Bao Wednesday, December 7, 2011 9:23 AM
Tuesday, November 22, 2011 12:56 PMModerator