MVVM Messaging vs RaisePropertyChanged <T>

  • What is the difference between MVVM and RaisePropertyChanged messages.

  • I'm trying to run a function in Model A view when changing a property in Model B model, which approach is better to use - messages or broadcast RaisePropertyChanged?

Thank you Nihil

+3
source share
4 answers
  • Messages separate your viewing models. It's like a tweet, you send a message on the air, and someone can read it, or someone can register to listen to it. PropertyChanged is used by the user interface to find out that something has changed and to redraw the values.

  • - , , . MVVM . mvvminpc.

, . , - - .

+3

@Kevin:

. , , .

, INotifyPropertyChanged, ( ) , .

, Cleanup, Messenger. - Cleanup - Unloaded event Messenger.Unregister(this) .

+1

, . , , .

0

, View A View B .

A B (, A "" B, -), B.PropertyChanged. , B , -, . (offtopic: , B , A, , " / " ).

A B / , .

0

All Articles