Show / Hide Table of Contents

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 Source

PropertyHasChanged(String)

Declaration
protected void PropertyHasChanged(string propertyName)
Parameters
Type Name Description
System.String propertyName
| Improve this Doc View Source

PropertyIsChanging(String)

Declaration
protected void PropertyIsChanging(string propertyName)
Parameters
Type Name Description
System.String propertyName
| Improve this Doc View Source

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 Source

PropertyChanged

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler
| Improve this Doc View Source

PropertyChanging

Declaration
public event PropertyChangingEventHandler PropertyChanging
Event Type
Type Description
System.ComponentModel.PropertyChangingEventHandler

Implements

System.ComponentModel.INotifyPropertyChanged
System.ComponentModel.INotifyPropertyChanging
  • Improve this Doc
  • View Source
Back to top Generated by DocFX