public void ShouldInitializeProperties() { PropertyItem oldValue = new PropertyItemTestCase(); PropertyItem newValue = new PropertyItemTestCase(); PropertyValueChangedEventArgs args = new PropertyValueChangedEventArgs(PropertyGrid.PropertyValueChangedEvent, newValue, oldValue); Assert.AreEqual<RoutedEvent>(PropertyGrid.PropertyValueChangedEvent, args.RoutedEvent); Assert.AreEqual<PropertyItem>(newValue, args.Property); Assert.AreEqual<PropertyItem>(oldValue, args.OldValue as PropertyItem); }
void propertyGrid_PropertyValueChanged(object sender, PropertyValueChangedEventArgs e) { }
void Editor_PropertyValueChanged(object sender, PropertyValueChangedEventArgs e) { //for some reason this empty event seems to be required in order for the object to be updated }
private void RaisePropertyValueChangedEvent(PropertyItem property, object oldValue) { var args = new PropertyValueChangedEventArgs(PropertyValueChangedEvent, property, oldValue); RaiseEvent(args); }