MVVM update of calculated properties

前端 未结 5 666
粉色の甜心
粉色の甜心 2020-12-17 21:54

I\'m just learning MVVM, and I\'m trying to work how to display changes to a calculated property as a result of changes to the values from which it\'s calculated. All of the

5条回答
  •  再見小時候
    2020-12-17 22:46

    There is an addin called Fody/PropertyChanged that works at compile-time to automatically implement PropertyChanged. It will automatically see what properties in the same class make use of your property and raise all appropriate PropertyChanged events when that one complex tax calculation changes.

    You can decompile the compiled code with ILSpy to see what it did and verify that it's raising all appropriate events.

提交回复
热议问题