private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e) { this.viewModel_ = this.DataContext as Excel_cdsViewModel; this.issueInfoGrid_.Children.Clear(); this.issueInfoGrid_.Children.Add(this.viewModel_.Excel_issueInfoViewModel_.view()); this.swapLegFirstGrid_.Children.Clear(); this.swapLegFirstGrid_.Children.Add(this.viewModel_.Excel_swapLegViewModel_.view()); this.swapLegSecondGrid_.Children.Clear(); this.swapLegSecondGrid_.Children.Add(this.viewModel_.Excel_creditEventSwapLegViewModel_.view()); }