SinCsdn_Jun
SinCsdn_Jun
2015-12-28 07:56

wpf中textBox绑定list<string>显示

  • textbox
  • binding
  • net
            代码如下:
                    List<string> list = new List<string>() { "tim", "tom", "mom" };
        txb1.SetBinding(TextBox.TextProperty, new Binding("/") { Source = list });
        txb2.SetBinding(TextBox.TextProperty, new Binding("/") { Source = list });
        txb3.SetBinding(TextBox.TextProperty, new Binding("/") { Source = list });
                    如何让textbox通过绑定显示变成
                    ![图片说明](https://img-ask.csdn.net/upload/201512/28/1451289360_148951.png)这个样子,求教!
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐