C# Class Imml.BindableObject

Implements the INotifyPropertyChanged interface and exposes a RaisePropertyChanged method for derived classes to raise the PropertyChange event. The event arguments created by this class are cached to prevent managed heap fragmentation. Written by Josh Smith URL http://joshsmithonwpf.wordpress.com/2007/08/29/a-base-class-which-implements-inotifypropertychanged/
Inheritance: INotifyPropertyChanged
Mostrar archivo Open project: craigomatic/IMML

Public Methods

Method Description
GetPropertyChangedEventArgs ( string propertyName ) : PropertyNotificationEventArgs

Returns an instance of PropertyChangedEventArgs for the specified property name.

Protected Methods

Method Description
AfterPropertyChanged ( string propertyName ) : void

Derived classes can override this method to execute logic after a property is set. The base implementation does nothing.

RaisePropertyChanged ( string propertyName ) : void
RaisePropertyChanged ( string propertyName, object oldValue, object newValue ) : void

Attempts to raise the PropertyChanged event, and invokes the virtual AfterPropertyChanged method, regardless of whether the event was raised or not.

RaisePropertyChanged ( string propertyName, object oldValue, object newValue, string propertyHierarchy ) : void

Private Methods

Method Description
BindableObject ( ) : System
VerifyProperty ( string propertyName ) : void
_RaisePropertyChanged ( string propertyName, string propertyHierarchy, object oldValue, object newValue, bool attachValues ) : void

Method Details

AfterPropertyChanged() protected method

Derived classes can override this method to execute logic after a property is set. The base implementation does nothing.
protected AfterPropertyChanged ( string propertyName ) : void
propertyName string /// The property which was changed. ///
return void

GetPropertyChangedEventArgs() public static method

Returns an instance of PropertyChangedEventArgs for the specified property name.
public static GetPropertyChangedEventArgs ( string propertyName ) : PropertyNotificationEventArgs
propertyName string /// The name of the property to create event args for. ///
return PropertyNotificationEventArgs

RaisePropertyChanged() protected method

protected RaisePropertyChanged ( string propertyName ) : void
propertyName string
return void

RaisePropertyChanged() protected method

Attempts to raise the PropertyChanged event, and invokes the virtual AfterPropertyChanged method, regardless of whether the event was raised or not.
protected RaisePropertyChanged ( string propertyName, object oldValue, object newValue ) : void
propertyName string The property which was changed.
oldValue object The old value.
newValue object The new value.
return void

RaisePropertyChanged() protected method

protected RaisePropertyChanged ( string propertyName, object oldValue, object newValue, string propertyHierarchy ) : void
propertyName string
oldValue object
newValue object
propertyHierarchy string
return void