How to write a ViewModelBase in MVVM

前端 未结 5 729
孤街浪徒
孤街浪徒 2020-12-02 07:32

I\'m pretty new in WPF programming environment. I\'m trying to write a program out using MVVM design pattern.

I\'ve did some studies and read up some articles relate

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 07:53

    I like this BaseVewModel it gives a nice clean style to your view models. Check out the various 'before' and 'after' comparisons. Of course, nothing is mandatory - if you don't like a feature that the BaseViewModel provides then don't use it. Or modify it because you have the source code. In particular note that there are three different ways to implement properties with change notification - choose the level of sophistication that you understand/feel comfortable with.

提交回复
热议问题