3

I am implementing a class using fody ImplementPropertyChanged:

[ImplementPropertyChanged]
public class Translator
{
    public string this[string Text]
    {
        get
        {
            ...
        }
    }

    public void Invalidate()
    {
        OnPropertyChanged("item");
    }
}

Visual Studio tells me, that OnPropertyChanged is not defined. I thought, that ImplementPropertyChanged would define it.

How can I manually trigger a property change? In this case the indexer property changed.

Nathan
  • 5,427
  • 9
  • 44
  • 94

1 Answers1

1

It does implement OnPropertyChanged during compile time, so it is not visible and available for you during development. If you like to trigger the property change manually, implement the interface by yourself or use a base class that implements it.

doerig
  • 1,809
  • 1
  • 18
  • 26