Answered by:
Live tiles - supplying one of the logo images to my live tile parameters

Question
-
Hi. I am not sure If I am doing the things correctly. When I build my live tile update I want to supply just my Logo image to one of the templates. The logo has a size of 150x150 and is available under 'Assets' with the name Logo.png. I am trying this code but it doesn't work:
XmlDocument tileXMl = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideSmallImageAndText01); XmlNodeList tileTextAttributes = tileXMl.GetElementsByTagName("text"); tileTextAttributes[0].InnerText = newValue; XmlNodeList tileImageAttributes = tileXMl.GetElementsByTagName("image"); ((XmlElement)tileImageAttributes[0]).SetAttribute("src", "Logo.png"); var bindingElement = (XmlElement)tileXMl.GetElementsByTagName("binding").Item(0); bindingElement.SetAttribute("branding", "none");
Am I right that if image is available under Assets I should specify the src just as Logo.png?
Please notice that this code is executed by the background task. So Assets are located into primary project, while this code is written in the separate project for background task (but the belong to same solution).
Saturday, December 28, 2013 9:02 PM
Answers
-
Finally forced it to work with ms-appx:///images/Logo.png
- Marked as answer by Макс Хайтович Saturday, December 28, 2013 9:48 PM
Saturday, December 28, 2013 9:43 PM
All replies
-
Just FYI, tried to specify src for image as
ms-appx:///images/Logo.png
but this still doesn't work. Once again, Logo.png is available under assets in Project1, while I write code for tile update in Project2 , in same solution.Saturday, December 28, 2013 9:26 PM -
Finally forced it to work with ms-appx:///images/Logo.png
- Marked as answer by Макс Хайтович Saturday, December 28, 2013 9:48 PM
Saturday, December 28, 2013 9:43 PM -
ms-appx:///images/logo.png tells it to look in the images folder. If your logo is in assets then you'll need ms-appx:///assets/logo.pngSaturday, December 28, 2013 9:45 PMModerator
-
Yes, I got it. But I don't get how to create so-called 'images' folder. What is placed into this folder? I don't see such folder in my projects\solution.Saturday, December 28, 2013 9:49 PM