private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e) { this.viewModel_ = this.DataContext as InterestRateSwapViewModel; this.CouponPartGrid1_.Children.Clear(); this.CouponPartGrid1_.Children.Add(this.viewModel_.CouponPartViewModel_[0].View_); this.CouponPartGrid2_.Children.Clear(); this.CouponPartGrid2_.Children.Add(this.viewModel_.CouponPartViewModel_[1].View_); }