private void SetupTile()
        {
            var tileCredential = new CredentialStore();
            if (tileCredential.DefaultCredential.Host != "localhost")
            {
                // Updates will happen on a fixed interval.
                SampleTileSchedule.Recurrence = UpdateRecurrence.Interval;

                // Updates will happen every hour.  Because MaxUpdateCount is not set, the schedule will run indefinitely.
                SampleTileSchedule.Interval = UpdateInterval.EveryHour;

                string color = "Black";
                if (App.Theme == "dark")
                {
                    color = "White";
                }
                var url = string.Format("{0}/tile.png?Color={1}", tileCredential.DefaultCredential.Uri.ToString(), color);
                SampleTileSchedule.RemoteImageUri = new Uri(url);
                SampleTileSchedule.Start();
                TileScheduleRunning = true;
            }
        }
 public DevicesAndScenesViewModel()
 {
     _credentialStore = new CredentialStore();
     this.SelectedCredential = _credentialStore.DefaultCredential;
 }