/// <summary> /// 画面が読み込まれた後に呼ばれます。 /// </summary> /// <param name="sender">sender</param> /// <param name="e">e</param> private async void ViewLoaded(object sender, RoutedEventArgs e) { this.viewModel = this.DataContext as NewsManageViewModel; this.viewModel.IsBusy = true; await this.GetNewsCategoryList(); await this.GetNewsList(); this.viewModel.IsBusy = false; }
/// <summary> /// ニュース編集ボタンが押されたときに呼ばれます。 /// </summary> /// <param name="sender">sender</param> /// <param name="e">e</param> private void EditNewsButtonClick(object sender, RoutedEventArgs e) { var childView = new NewsManageView(); var childViewModel = new NewsManageViewModel(); childViewModel.UserId = this.viewModel.UserId; childViewModel.DisplayName = this.viewModel.DisplayName; childViewModel.AccessToken = this.viewModel.AccessToken; childView.DataContext = childViewModel; childView.Owner = this; childView.ShowDialog(); }