开发者

How can I transfer a parameter in an UserControl

I have a complex page with an independant UserControl (has its own ViewModel), and I want to transfer one parameter. I'm thinking of two solution :

开发者_StackOverflow社区
  • DependencyProperty for UserControl
  • MVVM Light messenger (By the way, how to make unique the message between sender and recorder? With NotificationMessage?)

Please, could you help me to find the most appropriate solution for MVVM architecture?


You can simply use a CLR property on the ViewModel, unless you have other requirements that you don't mention.


Finaly i declared the UserControl ViewModel in View ViewModel

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜