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