I began studying C# and I'm currently learning some Prism. I'm having some difficulty with the whole project structure and interfaces. Could you guys help me?
I've learned that ALL ViewModels implement inherit the BindableBase Interface. But what about the Models?
IE: I have a Employee Model. It has my Class Attributes with my Sets and Gets and the OnPropertyChanged implementation. Is that correct?
Model implements INotifyPropertyChanged
and ViewModel implements inherits BindableBase
?
BindableBase
is a base class to inherit from which is something different than implementing an interface. I'm sorry I can't answer your actual question because I'm only familiar with MVVMLight. – FilburtBindableBase
class (it's not an interface).BindableBase
has a neat way of implementingINotifyPropertyChanged
and it's up to you to use it or not. If you don't use it, nothing happens. Just implementINotifyPropertyChanged
and that's it. If you decide to use it, there's no problem using it on your models either but you have to include the prism assemblies when you do so which may or may not be desirable. Source code forBindableBase
: github.com/PrismLibrary/Prism/blob/master/Source/Prism/Mvvm/… – khaBindableBase
for theSetProperty
method fromINotifyPropertyChanged
. So... Do I implement that on my Models? If I did that, my ViewModel would inhert from nothing, right? And thank you Filburt for editing my original post. – ThalesMiguel