如何在Windows 8 metro app live tile中禁用徽标?

时间:2012-06-11 14:08:58

标签: windows-8 microsoft-metro live-tile

我正在尝试在我的地铁应用实时图块中禁用徽标,以便显示我的图块通知中的最后一行文字。 Windows 8 documentation {{3}} 说有一种方法可以在Package.appxmanifest文件中禁用此徽标。但是,它没有具体说明。我在ShortName中设置了.appxmanifest,并且还将“显示名称”字段设置为“所有徽标”;但是,默认徽标仍显示在实时图块的左下角,并遮盖了图块通知中的最后一行文本。有任何想法吗?

2 个答案:

答案 0 :(得分:4)

实时图块可以包含图像,文本或没有品牌。默认为应用徽标,您可以通过指定品牌“无”来创建实时切片更新时覆盖此徽标,如下所示:

var templateContent = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideImage);
   var imageElement = (XmlElement) templateContent.GetElementsByTagName("image").Item(0);
   imageElement.SetAttribute("src", string.Concat(imagePath, "wide_tile.png"));

   var bindingElement = (XmlElement) templateContent.GetElementsByTagName("binding").Item(0);
   bindingElement.SetAttribute("branding", "none");

   var tile = new TileNotification(templateContent);
   TileUpdateManager.CreateTileUpdaterForApplication().Update(tile);

答案 1 :(得分:0)

您不能同时拥有最后一行文字和短名称。它是徽标/短名称或最后一行文本。

http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/d7ed6580-0528-4a28-a475-731b37f2c89b