更新次要图标块的计数值 [英] Updating Count value of Secondary Iconic Tile
本文介绍了更新次要图标块的计数值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的
Dear All,
如何在Windows Phone开发中更新辅助图标平铺计数值.注意:我们仅尝试更新图标图块的内容.我们使用 backgroundagents 来进行深层敬酒通知.
How to update the secondary iconic tile count value in windows phone development. Note: We only trying to update the contents of iconic tile.We usedbackgroundagents for deep toast notification.
请向我们提供示例 achieve 相同.
Please provide us a sample to achieve the same.
推荐答案
要通过代码更新图标切片,请使用与更新标准切片相同的方法,但要使用IconicTileData类.
To update Iconic tiles from code use the same method you would use to update standard tiles but use the IconicTileData class.
例如:
ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("MainPage.xaml?tile=Secondary"));
if (null != TileToFind )
{
IconicTileData TileData = new IconicTileData()
{
Title = "Updated",
Count = 55,
SmallIconImage = new Uri("/Assets/SmallIcon.png", UriKind.Relative),
IconImage = new Uri("/Assets/IconicImage.png", UriKind.Relative),
BackgroundColor = new System.Windows.Media.Color() { A = 255, R = 255, G = 255, B = 0 }
};
TileToFind.Update(TileData);
}
这篇关于更新次要图标块的计数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文