public override void SetValue(object component, object value) { // Have the property bag raise an event to set the current value // of the property. PropertySpecEventArgs e = new PropertySpecEventArgs(item, value); // Eugene 28.02.2004 if (component is PropertyBag) { (component as PropertyBag).OnSetValue(e); } else { bag.OnSetValue(e); } }
public override object GetValue(object component) { // Have the property bag raise an event to get the current value // of the property. PropertySpecEventArgs e = new PropertySpecEventArgs(item, null); // Eugene 28.02.2004 if (component is PropertyBag) { (component as PropertyBag).OnGetValue(e); } else { bag.OnGetValue(e); } return(e.Value); }
/// <summary> /// This member overrides PropertyBag.OnSetValue. /// </summary> protected override void OnSetValue(PropertySpecEventArgs e) { propValues[e.Property.Name] = e.Value; base.OnSetValue(e); }
/// <summary> /// This member overrides PropertyBag.OnGetValue. /// </summary> protected override void OnGetValue(PropertySpecEventArgs e) { e.Value = propValues[e.Property.Name]; base.OnGetValue(e); }