WPF 绑定 in Code
Binding binding = new Binding(); //实例化绑定
binding.Source = this.TextBox1; //设置绑定源
binding.Path = new PropertyPath("Text"); //设置绑定属性
this.TextBox2.SetBinding(TextBox.TextProperty, binding); //设置控件绑定
binding.Source = this.TextBox1; //设置绑定源
binding.Path = new PropertyPath("Text"); //设置绑定属性
this.TextBox2.SetBinding(TextBox.TextProperty, binding); //设置控件绑定