Class ViewModel
Base class for ViewModel providing implementation of System.ComponentModel.INotifyPropertyChanging and System.ComponentModel.INotifyPropertyChanging
Inheritance
System.Object
ViewModel
Implements
System.ComponentModel.INotifyPropertyChanged
System.ComponentModel.INotifyPropertyChanging
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Neutronium.BuildingBlocks
Assembly: Neutronium.BuildingBlocks.ApplicationTools.dll
Syntax
public abstract class ViewModel : INotifyPropertyChanged, INotifyPropertyChanging
Methods
| Improve this Doc View SourcePropertyHasChanged(String)
Declaration
protected void PropertyHasChanged(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName |
PropertyIsChanging(String)
Declaration
protected void PropertyIsChanging(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName |
Set<T>(ref T, T, String)
Update property value and call corresponding System.ComponentModel.INotifyPropertyChanging and System.ComponentModel.INotifyPropertyChanging if needed
Declaration
protected bool Set<T>(ref T property, T value, string propertyName = null)
Parameters
Type | Name | Description |
---|---|---|
T | property | Property to be updated |
T | value | New value |
System.String | propertyName | Property name (filled by compiler when left null) |
Returns
Type | Description |
---|---|
System.Boolean | True if property value has changed and events have been fired |
Type Parameters
Name | Description |
---|---|
T | Property type |
Events
| Improve this Doc View SourcePropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangedEventHandler |
PropertyChanging
Declaration
public event PropertyChangingEventHandler PropertyChanging
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangingEventHandler |
Implements
System.ComponentModel.INotifyPropertyChanged
System.ComponentModel.INotifyPropertyChanging