首页 > 技术文章 > wp后台更新瓷片

walleyekneel 2014-03-02 01:11 原文

下载源码

还有一种方式,更新瓷片方式

1、

  /// <summary>
    /// 定时更新磁贴
    /// </summary>
    public class ShellUpdate
    {
        ShellTileSchedule schedule;
        public void CreateShell(string remoteUri, UpdateRecurrence updateOption = UpdateRecurrence.Interval)
        {
            schedule = new ShellTileSchedule
            {
                Interval = UpdateInterval.EveryHour,
                MaxUpdateCount = 10,
                Recurrence = updateOption,
                RemoteImageUri = new Uri(remoteUri),
            };
            schedule.Start();
        }

        public void StopShell() 
        {
            if (schedule!=null)
            {
                schedule.Stop();
            }
        }
    }

  

推荐阅读