Fody/PropertyChanged

OnPropertyNameChanged doesn't work

Genotypek opened this issue · 1 comments

Hello.

I'm working on my first WPF project. I'm using MVVM and Fody to simplify all property changed notifications.
I need to call a method when the property has changed. I found that it should be done automatically when using correct methods naming.

I got:
public Domain CurrentDomain { get; set; }

public void OnCurrentDomainChanged()
{
Console.Write("asd");
}

But OnCurrentDomainChanged is not called. All notifies to UI works well.
Even using [OnChangedMethod("OnCurrentDomainChanged")] on the property, doesn't change anything.

Do You know why it doesn't work?

Okay. Problem solved.

I found that PropertyChanged.Fody was installed in dependency project not directly in the project I was in need to use OnPropertyChanged. (That was caused by fast rearrange solution structure).

Whe I've installed NuGet package with PropertyChanged.Fody directly in desired project suddenly it started to work.