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