我想摆脱模型类中占用空间和重复性的RaisePropertyChanged-Properties.我想要我的模特课......
public class ProductWorkItem : NotificationObject
{
private string name;
public string Name
{
get { return name; }
set {
if (value == name) return;
name = value; RaisePropertyChanged(() => Name);
}
}
private string description;
public string Description
{
get { return description; }
set {
if (value == description) return;
description = value; RaisePropertyChanged(() => Description);
}
}
private string brand;
public string Brand
{
get { return brand; }
set {
if (value == brand) return; …Run Code Online (Sandbox Code Playgroud)