我可以改变在WinRT中的主砖的背景颜色? [英] Can I change the background color of the primary tile in WinRT?

查看:206
本文介绍了我可以改变在WinRT中的主砖的背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能改变我的WinRT应用的主要瓦的背景颜色?我想根据应用状态来改变它



我用这个代码改变瓷砖的文本:

  XmlDocument的contentSmall = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150Text02); 
contentSmall.GetElementsByTagName(textElementName)[1] .InnerText =---;
TileNotification notifSmall =新TileNotification(contentSmall);
TileUpdateManager.CreateTileUpdaterForApplication()更新(notifSmall)。


解决方案

有关主瓦,背景色为大多数模板使用在清单中显示的应用程序的颜色。这是由设计完成的,以促进通过颜色的应用一致的品牌(瓦,弹出面板等,都使用相同的颜色)。但是,如果在飞行中使用的唯一的图像模板,生成图像,那么当然你可以使用任何你想要的颜色。



一般来说,但是,现场瓦片并不意像的小工具被使用。应用状态是通过更正确地表示的徽章的在瓷砖上,而不是整个瓦片本身



的颜色的限制并不适用于二次瓦片,因为他们的背景色和前景色文本属性,你可以单独控制。



所有这同样适用于从应用程序或从后台任务发送瓷砖的更新 - 他们使用相同的API,因此没有什么独特的为


Is it possible to change the background color of the primary tile of my WinRT app? I'd like to change it according to app status.

I use this code for changing the text of the tile:

XmlDocument contentSmall = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150Text02);
contentSmall.GetElementsByTagName(textElementName)[1].InnerText = "---";
TileNotification notifSmall = new TileNotification(contentSmall);
TileUpdateManager.CreateTileUpdaterForApplication().Update(notifSmall);

解决方案

For the primary tile, the background color for most templates uses the app's color indicated in the manifest. This is done by design to promote a consistent branding via color for the app (tile, flyout panels, etc., all use the same color). However, if you use an image-only template and generate images on the fly, then of course you can use whatever colors you want.

Generally speaking, however, live tiles are not intended to be used like gadgets. App status is more rightly indicated through badges on the tile, rather than the entire tile itself.

The color limitation does not apply to secondary tiles, as they have background color and foreground text properties you can control individually.

All this applies equally to tile updates sent from the app or from a background task--they use the same API so there's nothing unique to either.

这篇关于我可以改变在WinRT中的主砖的背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆