private static PropertyInfo SurnameProperty = RegisterProperty(new PropertyInfo("Surname", "Surname"));
public string Surname
{
get { return GetProperty(SurnameProperty); }
set { SetProperty(SurnameProperty, value); }
}
private static PropertyInfo NameProperty =
RegisterProperty(p=>p.Name, "Project name");
public string Name
{
get { return GetProperty(NameProperty); }
set { SetProperty(NameProperty, value); }
}
The second method removes the need for hard coding the property name as a string, and should therefore improve maintenenance.
I think this came out just after the book went to print.
Copyright (c) Marimer LLC