protected override void OnNavigatedTo(NavigationEventArgs e) { if ((e.Parameter as Rephoto) != null) { this.item2 = e.Parameter as Rephoto; this.DataContext = item2; } else { this.DataContext = App.ZoomLoc.LastSelectedOldPic; } // Register the current page as a share source. this.dataTransferManager = DataTransferManager.GetForCurrentView(); this.dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager, DataRequestedEventArgs>(this.onDataRequested); base.OnNavigatedTo(e); }
public void parseJson(string response) { JsonObject root = JsonObject.Parse(response); IJsonValue json; IJsonValue json2; if (root.TryGetValue("result", out json)) { var oldPhoto = json.GetObject(); if (oldPhoto.TryGetValue("rephotos", out json2)) { JsonArray array = json2.GetArray(); foreach (var item in array) { var a = new Rephoto(item.GetObject()); this.RePhotos.Add(a); } } } }