开发者

How to get two different textboxes bound to two different data context?

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜