Reputation: 213
Hi am using the following code, the live tiles works fine but what i found the small logo is always there on there left bottom of the tile, how can i get rid of it? see this
XmlDocument tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideImageAndText01);
XmlDocument squareTileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquarePeekImageAndText01);
XmlNodeList textElements = tileXml.GetElementsByTagName("text");
textElements[0].AppendChild(tileXml.CreateTextNode(_serviceOrderItems.Count.ToString()));
XmlNodeList imageElements = tileXml.GetElementsByTagName("image");
XmlElement imageElement = (XmlElement)imageElements[0];
imageElement.SetAttribute("src", "ms-appx:///Assets/Image310X150.jpg");
imageElement.SetAttribute("alt", "Aker Solutions");
XmlNodeList squareImageElements = squareTileXml.GetElementsByTagName("image");
XmlElement squareImageElement = (XmlElement)squareImageElements.Item(0);
squareImageElement.SetAttribute("src", "ms-appx:///Assets/Image150X150.jpg");
squareImageElement.SetAttribute("alt", "Aker Solutions");
IXmlNode subnode = tileXml.ImportNode(squareTileXml.GetElementsByTagName("binding")[0], true);
tileXml.GetElementsByTagName("visual")[0].AppendChild(subnode);
TileNotification tile = new TileNotification(tileXml);
TileUpdateManager.CreateTileUpdaterForApplication().Update(tile);
Upvotes: 2
Views: 1072
Reputation: 170
Set branding="none"
<?xml version="1.0" encoding="UTF-8"?>
<tile>
<visual lang="en-US">
<binding template="TileSquareImage" branding="none">
<image id="1" src="http://abc..../xx.png"/>
</binding>
<binding template="TileWideImageAndText01" branding="none">
<image id="1" src="http://abc.../yy.png"/>
<text id="1">Test message</text>
</binding>
</visual>
</tile>
Upvotes: 3
Reputation: 3665
Edit
Just noticed the comments that you can set the branding attribute on the visual or binding node.
tileXml.getElementsByTagName('visual')[0].setAttribute('branding', 'none');
There is a small logo property on the tile that controls this. However the documentation states:
If this image is not provided, the small logo of this secondary tile's parent app is used.
Since a small logo is also required for your app there is no way to turn it off. A workaround is to set the small logo to a completely transparent 30 by 30 pixel png.
var tile = new Windows.UI.StartScreen.SecondaryTile(newTileID, newTileShortName, newTileDisplayName, TileActivationArguments, newTileOptions, uriLogo);
tile.smallLogo = new Windows.Foundation.Uri("ms-appx:///images/smallLogoBlank.png");
Upvotes: 1