15 references to Add
System.Windows.Forms.Tests (5)
System\Windows\Forms\ControlBindingsCollectionTests.cs (4)
128Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember"); 230Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember")); 244Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember")); 261Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember"));
System\Windows\Forms\ErrorProviderTests.cs (1)
1319form.DataBindings.Add("Text", customDataSource, "Error");
TestPassApp (10)
DataBindingExample.cs (10)
51textBox1.DataBindings.Add("Text", stu, "StudentNumber"); 52domainUpDown1.DataBindings.Add("Text", stu, "LuckyNumber"); 53numericUpDown1.DataBindings.Add("Text", stu, "Count"); 54label1.DataBindings.Add("Text", stu, "Name"); 55button1.DataBindings.Add("Text", stu, "Sex"); 56maskedTextBox1.DataBindings.Add("Text", stu, "PhoneNumber"); 57linkLabel1.DataBindings.Add("Text", stu, "HomeNumber"); 58richTextBox1.DataBindings.Add("Text", stu, "Hobby"); 59checkBox1.DataBindings.Add("Checked", stu, "IsStudent"); 60radioButton1.DataBindings.Add("Checked", stu, "IsStudent");