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