加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

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

发布时间:2020-12-14 05:28:24 所属栏目:Windows 来源:网络整理
导读:我正在尝试在我的地铁应用实时磁贴中禁用徽标,以便我的磁贴通知中的最后一行文本将显示. Windows 8 documentation 说有一种方法可以在Package.appxmanifest文件中禁用此徽标.但是,它没有具体说明.我在.appxmanifest中设置了ShortName,并且还将“Show name”
我正在尝试在我的地铁应用实时磁贴中禁用徽标,以便我的磁贴通知中的最后一行文本将显示. Windows 8 documentation
说有一种方法可以在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);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读