private async void Button_Click_1(object sender, RoutedEventArgs e) { try { RegionWaterItem item = (RegionWaterItem)this.flipView.SelectedItem; ViewModelLocator.MainStatic.CurrentSelectedRegionItem = item; //if (item.CommentItems.Count() < 1) //{ ViewModelLocator.MainStatic.Loading = true; await item.LoadComments(); ViewModelLocator.MainStatic.Loading = false; if (item.CommentItems.Count() < 1) { MessageDialog result = new MessageDialog("К сожалению у района еще не добавлены комментарии о качетсве воды. Вы можете стать первым и добавить свой комментарий."); result.ShowAsync(); } else { this.Frame.Navigate(typeof(CommentsSplitPage), item.Code.ToString()); }; //}; } catch { }; }
private void flipView_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { RegionWaterItem item = (RegionWaterItem)this.flipView.SelectedItem; ViewModelLocator.MainStatic.CurrentSelectedRegionItem = item; //item.LoadComments(); } catch { }; }