Windows 8.1实时磁贴上的背景颜色

时间:2014-08-14 16:00:13

标签: c# windows-8 windows-8.1

我有一个实时磁贴,我使用此代码在Windows 8.1中创建。据我所知,所述图块的背景颜色是图像的主色。但是,我的背景颜色是灰色,我的图像是蓝色。为什么呢?

XmlDocument tileData = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150Block);
XmlNodeList textData = tileData.GetElementsByTagName("text");
textData[0].InnerText = Math.Round(Double.Parse(data["currently"]["temperature"].ToString(), CultureInfo.CurrentCulture)) + "°";
textData[1].InnerText = Math.Round(Double.Parse(data["daily"]["data"][0]["temperatureMax"].ToString(), CultureInfo.CurrentCulture)) + "° / " + Math.Round(Double.Parse(data["daily"]["data"][0]["temperatureMin"].ToString(), CultureInfo.CurrentCulture)) + "°"; //Low
TileNotification notification = new TileNotification(tileData);
TileUpdateManager.CreateTileUpdaterForApplication().Update(notification);

0 个答案:

没有答案
相关问题