1 write to DataSource
System.Windows.Forms (1)
System\Windows\Forms\DataBinding\Binding.cs (1)
148
DataSource
= dataSource;
26 references to DataSource
System.Windows.Forms (9)
System\Windows\Forms\DataBinding\Binding.BindToObject.cs (5)
26
Debug.Assert(_owner.
DataSource
is not null, "how can we determine if DataSource is initialized or not if we have no data source?");
32
if (_owner.
DataSource
is not ISupportInitializeNotification ds || ds.IsInitialized)
61
Debug.Assert(sender == _owner.
DataSource
, "data source should not change");
62
Debug.Assert(_owner.
DataSource
is ISupportInitializeNotification, "data source should not change on the BindToObject");
66
if (_owner.
DataSource
is ISupportInitializeNotification ds)
System\Windows\Forms\DataBinding\Binding.cs (1)
1136
&&
DataSource
is not null
System\Windows\Forms\DataBinding\BindingContext.cs (2)
303
if (binding.
DataSource
== propBinding.BindableComponent)
361
BindingManagerBase newManager = newBindingContext.EnsureListManager(binding.
DataSource
!, binding.BindingMemberInfo.BindingPath);
System\Windows\Forms\DataBinding\ListBindingConverter.cs (1)
178
val = b.
DataSource
;
System.Windows.Forms.Design (5)
System\Windows\Forms\Design\ControlDesigner.cs (1)
540
if (binding.
DataSource
== e.Component)
System\Windows\Forms\Design\DesignBindingValueUIHandler.cs (3)
40
if ((binding.
DataSource
is IListSource || binding.
DataSource
is IList || binding.
DataSource
is Array) && binding.PropertyName.Equals(propDesc.Name))
System\Windows\Forms\Design\DesignBindingValueUIHandler.LocalUIItem.cs (1)
26
if (binding.
DataSource
is IComponent comp && comp.Site is { } site)
System.Windows.Forms.Tests (12)
System\Windows\Forms\BindingTests.cs (6)
30
Assert.Same(dataSource, binding.
DataSource
);
59
Assert.Same(dataSource, binding.
DataSource
);
88
Assert.Same(dataSource, binding.
DataSource
);
117
Assert.Same(dataSource, binding.
DataSource
);
146
Assert.Same(dataSource, binding.
DataSource
);
175
Assert.Same(dataSource, binding.
DataSource
);
System\Windows\Forms\ControlBindingsCollectionTests.cs (6)
130
Assert.Equal(1, binding.
DataSource
);
147
Assert.Equal(1, binding.
DataSource
);
164
Assert.Equal(1, binding.
DataSource
);
181
Assert.Equal(1, binding.
DataSource
);
198
Assert.Equal(1, binding.
DataSource
);
215
Assert.Equal(1, binding.
DataSource
);