开发者

Embedding controls in controls with MVVM

I am building 开发者_如何学Gomy WPF app with MVVM and am running into a little design stumbling point. I have a top level window that has some properties that I pass down to my first level of viewmodels and I accomplish that easily enough with the viewmodel constructors. But if I want to have some usercontrols inside of that level how do I pass information down to them into their view models?

thanks for your help


You need a Dependency Property on your child UserControls that you can bind to from you main control. @Doug Ferguson explained how to do this in this SO post. Hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜