public void RunDependencyObjectNoBinding() { DependencyObjectNoBindingResult = MeasureAction(() => { DummyDependencyObjectViewModel dependencyObjectViewModel = new DummyDependencyObjectViewModel(); for (int i = 0; i < TestInterations; ++i) { //nothing is listening to the property changed event dependencyObjectViewModel.DummyProperty = "DummyText"; } }); }
public void RunDependencyObjectWithBinding() { DependencyObjectWithBindingResult = MeasureAction(() => { DummyDependencyObjectViewModel dependencyObjectViewModel = new DummyDependencyObjectViewModel(); //the main window is bound to this propery and will listen to property change events on this object PropertyChangingViewModel = dependencyObjectViewModel; for (int i = 0; i < TestInterations; ++i) { //a textbox is listening to the property changed event dependencyObjectViewModel.DummyProperty = "DummyText"; } }); }