【发布时间】:2014-07-26 04:25:47
【问题描述】:
我的应用的主磁贴具有动态磁贴功能。但是,如果我关闭动态磁贴功能,当我返回“开始”屏幕时,我的应用程序的主磁贴仍显示动态磁贴的最后状态。
我想知道我需要做什么才能在我关闭动态磁贴功能后立即将应用的主磁贴恢复到其静态状态?目前,我需要调整磁贴的大小或移除/重新插入它以获得这种效果。
这是我关闭动态磁贴时运行的代码:
// Remove the Background Agent for the live tile.
ScheduledActionService.Remove("PeriodicTaskForLocation");
// Update tile.
RadFlipTileData extendedData = new RadFlipTileData()
{
WideVisualElement = null,
WideBackVisualElement = null,
IsTransparencySupported = true
};
ShellTile tile = ShellTile.ActiveTiles.First();
if (tile != null)
{
tile.Update(extendedData);
LiveTileHelper.UpdateTile(tile, extendedData);
}
【问题讨论】:
标签: windows-phone-8 telerik windows-phone live-tile background-agents