1 type derived from Binding
System.Windows.Forms.Tests (1)
System\Windows\Forms\BindingTests.cs (1)
628private class SubBinding : Binding
98 instantiations of Binding
DesignSurface (1)
MainForm.cs (1)
367richTextBox.DataBindings.Add(new Binding("Text", bindingSource, "Text", true, DataSourceUpdateMode.OnPropertyChanged));
System.Windows.Forms (2)
System\Windows\Forms\DataBinding\ControlBindingsCollection.cs (1)
149Binding binding = new(
System\Windows\Forms\DataBinding\ListBindingConverter.cs (1)
86return new Binding(
System.Windows.Forms.Tests (95)
System\Windows\Forms\BindingCompleteEventArgsTests.cs (4)
11yield return new object[] { new Binding(null, new object(), "member"), BindingCompleteState.DataError, BindingCompleteContext.DataSourceUpdate }; 30yield return new object[] { new Binding(null, new object(), "member"), BindingCompleteState.DataError, BindingCompleteContext.DataSourceUpdate, "errorText" }; 49yield return new object[] { new Binding(null, new object(), "member"), BindingCompleteState.DataError, BindingCompleteContext.DataSourceUpdate, "errorText", new InvalidOperationException() }; 68yield return new object[] { new Binding(null, new object(), "member"), BindingCompleteState.DataError, BindingCompleteContext.DataSourceUpdate, "errorText", new InvalidOperationException(), true };
System\Windows\Forms\BindingContextTests.cs (9)
799Binding binding = new(null, dataSource, "dataMember"); 817Binding binding = new(null, dataSource, "dataMember"); 836Binding binding = new(null, dataSource, "Property.ignored"); 855Binding binding = new(null, dataSource, "Property.ignore"); 875Binding binding = new(null, dataSource, "dataMember"); 906Binding binding = new(null, dataSource, "dataMember"); 938Binding binding = new(null, dataSource, "dataMember"); 965Binding binding = new(null, dataSource, "dataMember"); 990Binding binding = new(null, dataSource, "dataMember");
System\Windows\Forms\BindingManagerBaseTests.cs (11)
22Binding binding = new(null, new object(), "member"); 42Binding binding = new(null, new object(), "member"); 55Binding binding = new(null, new object(), "member"); 66Binding binding = new(null, new object(), "member"); 86Binding binding = new(null, new object(), "member"); 102Binding binding = new(null, new object(), "member"); 114Binding binding1 = new(null, new object(), "member"); 115Binding binding2 = new(null, new object(), "member"); 129Binding binding1 = new(null, new object(), "member"); 130Binding binding2 = new(null, new object(), "member"); 144Binding binding = new(null, new object(), "member");
System\Windows\Forms\BindingsCollectionTests.cs (23)
25Binding binding = new(null, new object(), "member"); 37Binding binding = new(null, new object(), "member"); 91Binding binding = new(null, new object(), "member"); 103Binding binding = new(null, new object(), "member"); 157Binding binding = new(null, new object(), "member"); 172Binding binding = new(null, new object(), "member"); 221Binding binding = new(null, new object(), "member"); 232Binding binding = new(null, new object(), "member"); 281Binding binding = new(null, new object(), "member"); 292Binding binding = new(null, new object(), "member"); 303Binding binding = new(null, new object(), "member"); 359Binding binding = new(null, new object(), "member"); 370Binding binding1 = new(null, new object(), "member"); 371Binding binding2 = new(null, new object(), "member"); 383Binding binding1 = new(null, new object(), "member"); 384Binding binding2 = new(null, new object(), "member"); 397Binding binding = new(null, new object(), "member"); 408Binding binding = new(null, new object(), "member"); 464Binding binding = new(null, new object(), "member"); 475Binding binding1 = new(null, new object(), "member"); 476Binding binding2 = new(null, new object(), "member"); 488Binding binding1 = new(null, new object(), "member"); 489Binding binding2 = new(null, new object(), "member");
System\Windows\Forms\BindingTests.cs (15)
24Binding binding = new(propertyName, dataSource, dataMember); 53Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled); 82Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled, dataSourceUpdateMode); 111Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled, dataSourceUpdateMode, nullValue); 140Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled, dataSourceUpdateMode, nullValue, formatString); 169Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled, dataSourceUpdateMode, nullValue, formatString, formatInfo); 197Binding binding = new("propertyName", new object(), "dataMember") 213Binding binding = new("propertyName", new object(), "dataMember") 229Binding binding = new("propertyName", new object(), "dataMember") 250Binding binding = new("propertyName", new object(), "dataMember") 265Binding binding = new("propertyName", new object(), "dataMember") 280Binding binding = new("propertyName", new object(), "dataMember") 306Binding binding = new("propertyName", new object(), "dataMember") 559Binding binding = new("propertyName", new object(), "dataMember") 605Binding binding = new("propertyName", new object(), "dataMember")
System\Windows\Forms\ControlBindingsCollectionTests.cs (28)
48yield return new object[] { new Binding(null, new object(), "dataMember") }; 49yield return new object[] { new Binding("", new object(), "dataMember") }; 50yield return new object[] { new Binding(nameof(Control.Text), new object(), "dataMember") }; 71Binding binding1 = new("", 1, "dataMember"); 72Binding binding2 = new(null, 1, "dataMember"); 73Binding binding3 = new(nameof(Control.Text), 1, "dataMember"); 78Binding binding4 = new(nameof(Control.Text), 1, "dataMember"); 92Binding binding = new(nameof(Control.Text), 1, "dataMember"); 102Binding binding1 = new(nameof(SubControl.Text), 1, "dataMember"); 103Binding binding2 = new(nameof(SubControl.AccessibleRole), 1, "dataMember"); 104Binding binding3 = new(null, 1, "dataMember"); 105Binding binding4 = new("", 1, "dataMember"); 106Binding binding5 = new(nameof(SubControl.text), 1, "dataMember"); 241Assert.Throws<ArgumentException>("PropertyName", () => collection.Add(new Binding("NoSuchProperty", new object(), "dataMember"))); 255Binding binding = new(nameof(Control.Text), new object(), "dataMember"); 258Assert.Throws<ArgumentException>("binding", () => collection.Add(new Binding(nameof(Control.Text), new object(), "dataMember"))); 280Binding binding = new(null, new object(), "member"); 293Binding binding = new(null, new object(), "member"); 304Binding binding = new(null, new object(), "member"); 324Binding binding = new(null, new object(), "member"); 340Binding binding = new(null, new object(), "member"); 352Binding binding1 = new(null, new object(), "member"); 353Binding binding2 = new(null, new object(), "member"); 367Binding binding1 = new(null, new object(), "member"); 368Binding binding2 = new(null, new object(), "member"); 382Binding binding = new(null, new object(), "member"); 400Binding binding = new(nameof(Control.Text), new object(), "member"); 413Binding binding = new(nameof(Control.Text), new object(), "member");
System\Windows\Forms\ControlTests.Methods.cs (4)
1151control.DataBindings.Add(new Binding("Text", new object(), "member")); 1599control.DataBindings.Add(new Binding("Text", new object(), "member")); 1646Binding binding = new("Text", new object(), "member"); 6405control.DataBindings.Add(new Binding("Text", new object(), "member"));
System\Windows\Forms\PropertyManagerTests.cs (1)
166Binding cancelBinding = new("Value", dataSource, "Property", true);
157 references to Binding
System.Windows.Forms (56)
System\Windows\Forms\Control.cs (3)
924if (!Binding.IsSupported) 1528if (!Binding.IsSupported) 6614if (!Binding.IsSupported)
System\Windows\Forms\Controls\ListControl\ListControl.cs (3)
141if (!Binding.IsSupported) 433if (!Binding.IsSupported) 704if (!Binding.IsSupported)
System\Windows\Forms\DataBinding\Binding.BindToObject.cs (2)
13private readonly Binding _owner; 52internal BindToObject(Binding owner)
System\Windows\Forms\DataBinding\Binding.cs (1)
48/// Initializes a new instance of the <see cref="Binding"/> class
System\Windows\Forms\DataBinding\BindingCompleteEventArgs.cs (5)
17Binding? binding, 36Binding? binding, 49Binding? binding, 61Binding? binding, 68public Binding? Binding { get; }
System\Windows\Forms\DataBinding\BindingContext.cs (3)
290private static void CheckPropertyBindingCycles(BindingContext newBindingContext, Binding propBinding) 302Binding binding = bindingManagerBase.Bindings[i]; 345public static void UpdateBinding(BindingContext? newBindingContext, Binding binding)
System\Windows\Forms\DataBinding\BindingManagerBase.cs (3)
299if (e.Element is not Binding binding) 313foreach (Binding bi in Bindings) 329foreach (Binding bi in Bindings)
System\Windows\Forms\DataBinding\BindingsCollection.cs (9)
15private readonly List<Binding> _list = []; 31/// Gets the <see cref="Binding"/> at the specified index. 33public Binding this[int index] => _list[index]!; 35protected internal void Add(Binding binding) 44/// Adds a <see cref="Binding"/> to the collection. 46protected virtual void AddCore(Binding dataBinding) 101protected internal void Remove(Binding binding) 112/// Removes the specified <see cref="Binding"/> from the collection. 114protected virtual void RemoveCore(Binding dataBinding) => _list.Remove(dataBinding);
System\Windows\Forms\DataBinding\ControlBindingsCollection.cs (16)
28public Binding? this[string propertyName] 32foreach (Binding binding in this) 51public new void Add(Binding binding) => base.Add(binding); 60public Binding Add(string propertyName, object dataSource, string? dataMember) => 71public Binding Add( 86public Binding Add( 102public Binding Add( 119public Binding Add( 137public Binding Add( 149Binding binding = new( 169protected override void AddCore(Binding dataBinding) 189internal void CheckDuplicates(Binding binding) 195Binding current = this[i]; 216Binding dataBinding = this[i]; 231public new void Remove(Binding binding) => base.Remove(binding); 240protected override void RemoveCore(Binding dataBinding)
System\Windows\Forms\DataBinding\ListBindingConverter.cs (6)
68if (destinationType == typeof(InstanceDescriptor) && value is Binding) 70Binding b = (Binding)value; 114private static InstanceDescriptor GetInstanceDescriptorFromValues(Binding b) 153ConstructorInfo? ctor = typeof(Binding).GetConstructor(ctorParams); 158ctor = typeof(Binding).GetConstructor(
System\Windows\Forms\DataBinding\ListManagerBindingsCollection.cs (2)
26protected override void AddCore(Binding dataBinding) 55protected override void RemoveCore(Binding dataBinding)
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (2)
391Binding? binding = e.Binding; 483Binding dataBinding = errBindings[j];
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
254if (!Binding.IsSupported)
System.Windows.Forms.Design (5)
System\Windows\Forms\Design\ControlDesigner.cs (1)
539Binding binding = ctl.DataBindings[i];
System\Windows\Forms\Design\DesignBindingValueUIHandler.cs (1)
36foreach (Binding binding in control.DataBindings)
System\Windows\Forms\Design\DesignBindingValueUIHandler.LocalUIItem.cs (3)
13internal LocalUIItem(DesignBindingValueUIHandler handler, Binding binding) 21internal Binding Binding { get; } 23private static string GetToolTip(Binding binding)
System.Windows.Forms.Tests (96)
System\Windows\Forms\BindingCompleteEventArgsTests.cs (4)
17public void Ctor_Binding_BindingCompleteState_BindingCompleteContext(Binding binding, BindingCompleteState state, BindingCompleteContext context) 36public void Ctor_Binding_BindingCompleteState_BindingCompleteContext_String(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText) 55public void Ctor_Binding_BindingCompleteState_BindingCompleteContext_String_Exception(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, Exception exception) 74public void Ctor_Binding_BindingCompleteState_BindingCompleteContext_String_Exception_Bool(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, Exception exception, bool cancel)
System\Windows\Forms\BindingContextTests.cs (9)
799Binding binding = new(null, dataSource, "dataMember"); 817Binding binding = new(null, dataSource, "dataMember"); 836Binding binding = new(null, dataSource, "Property.ignored"); 855Binding binding = new(null, dataSource, "Property.ignore"); 875Binding binding = new(null, dataSource, "dataMember"); 906Binding binding = new(null, dataSource, "dataMember"); 938Binding binding = new(null, dataSource, "dataMember"); 965Binding binding = new(null, dataSource, "dataMember"); 990Binding binding = new(null, dataSource, "dataMember");
System\Windows\Forms\BindingManagerBaseTests.cs (11)
22Binding binding = new(null, new object(), "member"); 42Binding binding = new(null, new object(), "member"); 55Binding binding = new(null, new object(), "member"); 66Binding binding = new(null, new object(), "member"); 86Binding binding = new(null, new object(), "member"); 102Binding binding = new(null, new object(), "member"); 114Binding binding1 = new(null, new object(), "member"); 115Binding binding2 = new(null, new object(), "member"); 129Binding binding1 = new(null, new object(), "member"); 130Binding binding2 = new(null, new object(), "member"); 144Binding binding = new(null, new object(), "member");
System\Windows\Forms\BindingsCollectionTests.cs (25)
25Binding binding = new(null, new object(), "member"); 37Binding binding = new(null, new object(), "member"); 91Binding binding = new(null, new object(), "member"); 103Binding binding = new(null, new object(), "member"); 157Binding binding = new(null, new object(), "member"); 172Binding binding = new(null, new object(), "member"); 221Binding binding = new(null, new object(), "member"); 232Binding binding = new(null, new object(), "member"); 281Binding binding = new(null, new object(), "member"); 292Binding binding = new(null, new object(), "member"); 303Binding binding = new(null, new object(), "member"); 359Binding binding = new(null, new object(), "member"); 370Binding binding1 = new(null, new object(), "member"); 371Binding binding2 = new(null, new object(), "member"); 383Binding binding1 = new(null, new object(), "member"); 384Binding binding2 = new(null, new object(), "member"); 397Binding binding = new(null, new object(), "member"); 408Binding binding = new(null, new object(), "member"); 464Binding binding = new(null, new object(), "member"); 475Binding binding1 = new(null, new object(), "member"); 476Binding binding2 = new(null, new object(), "member"); 488Binding binding1 = new(null, new object(), "member"); 489Binding binding2 = new(null, new object(), "member"); 550public new void AddCore(Binding dataBinding) => base.AddCore(dataBinding); 554public new void RemoveCore(Binding dataBinding) => base.RemoveCore(dataBinding);
System\Windows\Forms\BindingTests.cs (15)
24Binding binding = new(propertyName, dataSource, dataMember); 53Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled); 82Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled, dataSourceUpdateMode); 111Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled, dataSourceUpdateMode, nullValue); 140Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled, dataSourceUpdateMode, nullValue, formatString); 169Binding binding = new(propertyName, dataSource, dataMember, formattingEnabled, dataSourceUpdateMode, nullValue, formatString, formatInfo); 197Binding binding = new("propertyName", new object(), "dataMember") 213Binding binding = new("propertyName", new object(), "dataMember") 229Binding binding = new("propertyName", new object(), "dataMember") 250Binding binding = new("propertyName", new object(), "dataMember") 265Binding binding = new("propertyName", new object(), "dataMember") 280Binding binding = new("propertyName", new object(), "dataMember") 306Binding binding = new("propertyName", new object(), "dataMember") 559Binding binding = new("propertyName", new object(), "dataMember") 605Binding binding = new("propertyName", new object(), "dataMember")
System\Windows\Forms\ControlBindingsCollectionTests.cs (30)
55public void Add_Binding_Success(Binding binding) 71Binding binding1 = new("", 1, "dataMember"); 72Binding binding2 = new(null, 1, "dataMember"); 73Binding binding3 = new(nameof(Control.Text), 1, "dataMember"); 78Binding binding4 = new(nameof(Control.Text), 1, "dataMember"); 92Binding binding = new(nameof(Control.Text), 1, "dataMember"); 102Binding binding1 = new(nameof(SubControl.Text), 1, "dataMember"); 103Binding binding2 = new(nameof(SubControl.AccessibleRole), 1, "dataMember"); 104Binding binding3 = new(null, 1, "dataMember"); 105Binding binding4 = new("", 1, "dataMember"); 106Binding binding5 = new(nameof(SubControl.text), 1, "dataMember"); 126Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember"); 143Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true); 160Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged); 177Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null"); 194Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString"); 211Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture); 255Binding binding = new(nameof(Control.Text), new object(), "dataMember"); 280Binding binding = new(null, new object(), "member"); 293Binding binding = new(null, new object(), "member"); 304Binding binding = new(null, new object(), "member"); 324Binding binding = new(null, new object(), "member"); 340Binding binding = new(null, new object(), "member"); 352Binding binding1 = new(null, new object(), "member"); 353Binding binding2 = new(null, new object(), "member"); 367Binding binding1 = new(null, new object(), "member"); 368Binding binding2 = new(null, new object(), "member"); 382Binding binding = new(null, new object(), "member"); 400Binding binding = new(nameof(Control.Text), new object(), "member"); 413Binding binding = new(nameof(Control.Text), new object(), "member");
System\Windows\Forms\ControlTests.Methods.cs (1)
1646Binding binding = new("Text", new object(), "member");
System\Windows\Forms\PropertyManagerTests.cs (1)
166Binding cancelBinding = new("Value", dataSource, "Property", true);