Click or drag to resize

ObservableObjectBase Class

Base class implementing INotifyPropertyChanged.

Supports declarative dependencies specified by the PropertyDependencyAttribute and relaying events of other objects using the RelayedEventAttribute.

Inheritance Hierarchy
SystemObject
  TomsToolbox.WpfObservableObjectBase
    TomsToolbox.WpfObservableObject

Namespace: TomsToolbox.Wpf
Assembly: TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
[SerializableAttribute]
public abstract class ObservableObjectBase : INotifyPropertyChanged, 
	IDataErrorInfo, INotifyDataErrorInfo

The ObservableObjectBase type exposes the following members.

Constructors
 NameDescription
Protected methodObservableObjectBaseInitializes a new instance of the ObservableObjectBase class
Top
Methods
 NameDescription
Protected methodDetachEventSource Detaches the event source.
Protected methodDetachEventSources Detaches all event sources.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Overrides ObjectFinalize)
Protected methodGetDataErrors Gets the validation errors for a specified property or for the entire entity.
Protected methodOnDataErrorsEvaluated Called when data errors have been evaluated. Used e.g. to track data errors for each property.
Protected methodOnErrorsChanged Raises the ErrorsChanged event.
Protected methodOnPropertyChanged(String) Raises the PropertyChanged event for the property with the specified name.

[NotifyPropertyChangedInvocator]

Protected methodOnPropertyChangedT(ExpressionFuncT) Raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodRelayEventsOf(INotifyPropertyChanged) Relays the property changed events of the source object. The properties to relay must be declared with the RelayedEventAttribute.
Protected methodRelayEventsOf(INotifyPropertyChanged, INotifyPropertyChanged) Relays the property changed events of the source object (if not null) and detaches the old source (if not null).
Protected methodSetPropertyT(T, T, ExpressionFuncT) Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodSetPropertyT(T, T, String) Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodSetPropertyT(T, T, ExpressionFuncT, ActionT, T) Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodSetPropertyT(T, T, String, ActionT, T) Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Protected methodSetPropertyT(T, T, ActionT, T, String) Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Top
Events
 NameDescription
Public eventPropertyChanged Occurs when a property value changes.
Top
Extension Methods
 NameDescription
Public Extension MethodSafeCastT Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions)
Top
Remarks
Also implements IDataErrorInfo and INotifyDataErrorInfo to support validation. The default implementation examines ValidationAttribute on the affected properties to retrieve error information.
See Also