WPF/MVVM:Set multiple datacontext to ONE usercontrol

Posted by msfanboy on Stack Overflow See other posts from Stack Overflow or by msfanboy
Published on 2010-05-04T15:30:20Z Indexed on 2010/05/04 15:48 UTC
Read the original article Hit count: 733

Hello,

I have a UserControl with 5 small UserControl which are parts of the first UserControl.

The first UserControl is datatemplated by a MainViewModel type.

The other 5 small UserControls have also set the DataContext to this MainViewModel type.

Now I want additionally that those 5 UserControls get a 2nd DataContext to access other public

properties of another ViewModel .

How can I do that?

© Stack Overflow or respective owner

Related posts about multiple

Related posts about datacontext