Ejemplo n.º 1
0
 /// <summary>
 /// This member overrides PropertyBag.OnGetValue.
 /// </summary>
 protected override void OnGetValue(PropertySpecEventArgs e)
 {
     e.Value = propValues[e.Property.Name];
     base.OnGetValue(e);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// This member overrides PropertyBag.OnSetValue.
 /// </summary>
 protected override void OnSetValue(PropertySpecEventArgs e)
 {
     propValues[e.Property.Name] = e.Value;
     base.OnSetValue(e);
 }
Ejemplo n.º 3
0
            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);
                bag.OnSetValue(e);
            }
Ejemplo n.º 4
0
            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);
                bag.OnGetValue(e);
                return e.Value;
            }
Ejemplo n.º 5
0
 /// <summary>
 /// Raises the SetValue event.
 /// </summary>
 /// <param name="e">A PropertySpecEventArgs that contains the event data.</param>
 protected virtual void OnSetValue(PropertySpecEventArgs e)
 {
     if(SetValue != null)
         SetValue(this, e);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// This member overrides PropertyBag.OnSetValue.
 /// </summary>
 protected override void OnSetValue(PropertySpecEventArgs e)
 {
     propValues[e.Property.Name] = e.Value;
     base.OnSetValue(e);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// This member overrides PropertyBag.OnGetValue.
 /// </summary>
 protected override void OnGetValue(PropertySpecEventArgs e)
 {
     e.Value = propValues[e.Property.Name];
     base.OnGetValue(e);
 }