8,750
社区成员
发帖
与我相关
我的任务
分享
TextBox textBox1 = new TextBox();
TextBox textBox2 = new TextBox() { TextWrapping = TextWrapping.Wrap, Width = 100 };
Binding bindings = new Binding();
bindings.Path = new PropertyPath("Text");
bindings.Source = textBox1;
textBox2.SetBinding(TextBox.TextProperty,bindings);
this.controlContainer.Children.Add(textBox1);
ToolTip tip = new ToolTip();
tip.Content = textBox2;
ToolTipService.SetToolTip(textBox1, tip);