Reputation: 26438
I have a ProjectModel
and a ProjectViewModel
class; my Model handles direct manipulation of a project, while the view model is providing the "view friendly" properties and commands
However, in my ViewModel I'm exposing the read-only project contract for view binding
private ProjectModel Model { get; set; }
public IProject Project
{
get
{
return Model.Project;
}
}
So here, the property Model
doesn't change, but the property Model.Project
will change, and so Model
will raise its PropertyChanged event when it does
Now, I know Fody-PropertyChanged has the ability to detect if a property is dependent on another property (in the same class) and raise the change event if the other changes.
I was wondering whether it is possible for Fody-PropertyChanged to raise PropertyChanged("Project")
when the Model
object raises its changed notifier.
I could do it manually, of course; but I'd prefer to stick with Fody. Is this a bad idea? Alternatively, is this a bad MVVM practice to begin with?
Upvotes: 1
Views: 2071
Reputation: 34880
No Fody-PropertyChanged does not currently support detecting wrapped properties in the way you describe.
Upvotes: 1