views:

25

answers:

1

Hi everyone, Normally we bind a textbox's Text property to a data-context's properties. The data-context can be 1) the code behind (default) and 2) the view-model, 3) others which specified in Initial method of the form (this.DataContext = ... ).

What I want to do: bind two textboxes to two different data context in the same form. How can I do this?

+1  A: 

You can set the DataContext property of the textbox to its own data context.

Wouter Janssens - Xelos bvba