我有一个 Windows Phone 7 应用程序,该应用程序当前使用 Live Tile Schedules 进行更新。
新版本的应用程序使用后台任务来更新磁贴。
但是,在手机上升级应用程序后,如果主磁贴上已运行磁贴计划,它不会停止更新。
如果瓷砖计划正在运行,我需要停止它。
创建新计划并停止它不起作用:
var t = new ShellTileSchedule()
{
MaxUpdateCount = 1,
Recurrence = UpdateRecurrence.Onetime,
StartTime = DateTime.Now,
RemoteImageUri = new Uri("http://mysite.com/livetile.png"),
};
t.Start();
t.Stop();
在活动磁贴的主磁贴上创建新计划不起作用:
ShellTile mainTile = ShellTile.ActiveTiles.FirstOrDefault();
t = new ShellTileSchedule(mainTile)
{
MaxUpdateCount = 1,
Recurrence = UpdateRecurrence.Onetime,
StartTime = DateTime.Now,
RemoteImageUri = new Uri("http://mysite.com/livetile.png")
};
t.Start();
t.Stop();