using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace WPScheduledTile
{
    public partial class MainPage : PhoneApplicationPage
    {
        ShellTileSchedule mySchedule;
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            CreateOneTimeOnly();
        }
        private void CreateOneTimeOnly()
        {
            mySchedule = new ShellTileSchedule();
            //mySchedule.Stop();
            mySchedule.RemoteImageUri = new Uri("http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/1033.image_5F00_thumb_5F00_386776A0.png");

            mySchedule.Recurrence = UpdateRecurrence.Onetime;
            mySchedule.StartTime = DateTime.Now;

            mySchedule.Start();
        }
    }
}