0

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 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.