I am using SimpleMVVM and have two separate classes (models), one using the second like this:
public class Database : ModelBase<Database>
{
public String ServerName //{ get; set; }
{
get { return _ServerName; }
set
{
if (_ServerName != value)
{
_ServerName = value;
NotifyPropertyChanged(m => m.ServerName);
}
}
}
private String _ServerName = "MyTestServer";
// other properties removed for brevity
}
public class MyConfiguration
{
/// <summary>
/// Database information
/// </summary>
public Database DatabaseInfo
{
get { return _DatabaseInfo; }
set
{
if (_DatabaseInfo != value)
{
_DatabaseInfo = value;
NotifyPropertyChanged(m => m.DatabaseInfo);
}
}
}
private Database _DatabaseInfo = new Database();
}
When 'ServerName'
is changed, the NotifyPropertyChanged(m => m.ServerName);
command executes but NOT NotifyPropertyChanged(m => m.DatabaseInfo);
How do I make the NotifyPropertyChanged(m => m.DatabaseInfo);
fire whenever one of the properties of Database
changes?