Open papafe opened 1 year ago
Indeed, we really need this functionality. I don't see a clean workaround to handle notifications for dependent properties, since we don't have access to persisted property setters.
Perhaps you could take inspiration from the 'DependsOn' attribute of PropertyChanged.Fody.
For now you could add a partial void method that will be called when a property changes:
partial void OnPropertyChanged(string? propertyName)
{
if (propertyName == nameof(Name) || propertyName == nameof(Surname))
{
RaisePropertyChanged(nameof(FullName));
}
}
Indeed it works, thanks for the tip!
It would be nice to support something like this:
This should:
FullName
when eitherName
orSurname
are modifiedFullName
is called from the UI.While the first point can already be done now with some manual work from the developer, the second point cannot be implemented without our support.