Implemented propertychanged pattern to connect UI with entity
This commit is contained in:
30
Common.Library/BaseClasses/CommonBase.cs
Normal file
30
Common.Library/BaseClasses/CommonBase.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Common.Library;
|
||||
|
||||
public abstract class CommonBase : INotifyPropertyChanged
|
||||
{
|
||||
#region Constructor
|
||||
protected CommonBase()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Init Method
|
||||
public virtual void Init()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region RaisePropertyChanged Method
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
public virtual void RaisePropertyChanged(string propertyName)
|
||||
{
|
||||
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
7
Common.Library/BaseClasses/EntityBase.cs
Normal file
7
Common.Library/BaseClasses/EntityBase.cs
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
namespace Common.Library
|
||||
{
|
||||
public class EntityBase : CommonBase
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user