private void Subscribe(PropertyMatcherViewModel viewModel) { viewModel.InputFields.CollectionChanged += viewModel_CollectionChanged; viewModel.OutputFields.CollectionChanged += viewModel_CollectionChanged; viewModel.Connections.CollectionChanged += viewModel_CollectionChanged; viewModel.Connections.CollectionChanged += connections_collectionChanged; foreach (var conn in viewModel.Connections) { conn.PropertyChanged += connection_PropertyChanged; } }
public PropertyMatcherView() { InitializeComponent(); ViewModel = this.DataContext as PropertyMatcherViewModel; }
private void UserControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { ViewModel = e.NewValue as PropertyMatcherViewModel; UpdateAllPaths(); }