WP7 Mango:如何删除动态磁贴?
我使用以下代码在设备上创建一个动态磁贴:
ShellTile tile = ShellTile.ActiveTiles.FirstOrDefault();
StandardTileData newTileData = new StandardTileData
{
BackgroundImage = new Uri(string.Format("isostore:{0}", DefaultLiveTilePath), UriKind.Absolute),
Title = "Test"
};
tile.Update(newTileData);
稍后我想删除动态磁贴图像并在固定时将其恢复为应用程序图标。这可能吗?
I'm creating a live tile on the device with the following code:
ShellTile tile = ShellTile.ActiveTiles.FirstOrDefault();
StandardTileData newTileData = new StandardTileData
{
BackgroundImage = new Uri(string.Format("isostore:{0}", DefaultLiveTilePath), UriKind.Absolute),
Title = "Test"
};
tile.Update(newTileData);
At a later point I would like to delete the live tile image and have it revert to the app icon when pinned. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据此博客 你应该使用此代码
According to this blog you shoudl use this code
每次应用程序启动时,我都会使用以下代码将磁贴重置为正常状态:
I'm using the following code when resetting my tile back to normal everytime the app starts:
ShellTile.ActiveTiles.FirstOrDefault();
已过时。基于研究并感谢 robertftw
ShellTile.ActiveTiles.FirstOrDefault();
is obsolete.Based on research and thanks to robertftw