private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e) { this.viewModel_ = this.DataContext as CreditDefaultSwapViewModel; this.ProtectionGrid_.Children.Clear(); this.ProtectionGrid_.Children.Add(this.viewModel_.ProtectionPartViewModel_.View_); this.CouponPartGrid_.Children.Clear(); this.CouponPartGrid_.Children.Add(this.viewModel_.CouponPartViewModel_.View_); }