我正在尝试在我的地铁应用实时磁贴中禁用徽标,以便我的磁贴通知中的最后一行文本将显示.
Windows 8 documentation
说有一种方法可以在Package.appxmanifest文件中禁用此徽标.但是,它没有具体说明.我在.appxmanifest中设置了ShortName,并且还将“Show name”字段设置为“All logos”;但是,默认徽标仍显示在实时图块的左下角,并遮盖了图块通知中的最后一行文本.有任何想法吗?
说有一种方法可以在Package.appxmanifest文件中禁用此徽标.但是,它没有具体说明.我在.appxmanifest中设置了ShortName,并且还将“Show name”字段设置为“All logos”;但是,默认徽标仍显示在实时图块的左下角,并遮盖了图块通知中的最后一行文本.有任何想法吗?
解决方法
实时图块可以包含图像,文本或没有品牌.默认为app徽标,当您通过指定branding“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);