Interface IViewModelCommon
Encapsulates implementations of INotifyPropertyChanged and INotifyDataErrorInfo and adds PropertyValueChanged event which is raised in tandem with PropertyChanged except it provides addition data like old value and new value.
Inherited Members
Namespace: BionicCode.Utilities.Net
Assembly: BionicCode.Utilities.Net.Common.dll
Syntax
public interface IViewModelCommon : INotifyDataErrorInfo, IProgressReporterCommon, INotifyPropertyChanged
Methods
| Improve this Doc View SourceGetPropertyErrors(String)
Gets all error messages of the specified property. If the propertyName is null all error messages will be returned.
Declaration
IEnumerable<string> GetPropertyErrors(string propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | propertyName | The of the property of which the error messages should be returned. |
Returns
| Type | Description |
|---|---|
| IEnumerable<String> | Returns an IEnumerable<T> containing all error messages of the specified property. |
Remarks
If the propertyName is null all current error messages will be returned.
PropertyHasError(String)
Checks whether the specified property has errors or is valid.
Declaration
bool PropertyHasError(string propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | propertyName | The name of the property to check for errors. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
Events
| Improve this Doc View SourcePropertyValueChanged
PropertyChanged implementation that sends old value and new value of the change and raises the INotifyPropertyChanged event.
Declaration
event PropertyValueChangedEventHandler<object> PropertyValueChanged
Event Type
| Type | Description |
|---|---|
| PropertyValueChangedEventHandler<Object> |