2

Create winform project targeting .net 4.5.1

Install-Package PropertyChanged.Fody

[ImplementPropertyChanged]
public class PersonFody
{
    public string Name { get; set; }
}

PersonFody _fod = new PersonFody();

_fod. //Name is the only property and no events to subscribe

Is it possible to subscribe to a PropertyChanged event at design time using fody?
Watson
  • 1,385
  • 1
  • 15
  • 36

1 Answers1

5

I guess this is late, but yes you can. Just add this event to your class:

public event PropertyChangedEventHandler PropertyChanged;

Fody will recognize you have the correct event for the IPropertyChanged interface and wire all your properties to trigger that event.

Greg
  • 1,549
  • 1
  • 20
  • 34