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.Da开发者_StackOverflowtaContext = ... ).
What I want to do: bind two textboxes to two different data context in the same form. How can I do this?
You can set the DataContext property of the textbox to its own data context.
精彩评论