如何在Windows 8 Metro应用程序的动态磁贴中禁用标志?

4
我正在尝试禁用我的metro应用程序的动态磁贴中的logo,以便在磁贴通知的最后一行文本中显示。根据Windows 8文档,可以在Package.appxmanifest文件中禁用此logo。然而,它没有具体说明如何操作。我已在.appxmanifest中设置了ShortName并将“Show name”字段设置为“All Logos”,但默认标志仍会出现在动态磁贴的左下角,并遮挡了磁贴通知中最后一行文本。有什么建议吗?
2个回答

4

活动图块可以拥有图片、文本或无标识。默认情况下为应用程序标志,您可以通过指定“none”品牌来覆盖此选项,从而在创建活动图块更新时进行调整,具体方法如下:

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);

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接