Switch-Case on Class.PropertyName (not value)
问题 I have a class which implements INotifyPropertyChanged like this: public class Person : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; string _color; public string Color { get{ return _color; } set { _color = value; RaisePropertyChanged(); } } ... private void RaisePropertyChanged([CallerMemberName]string prop = "") { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(prop)); } } When the Color property setter is called, it