11 writes to DataSource
Accessibility_Core_App (1)
DataControls.cs (1)
31bindingSource1.DataSource = dataTable;
DesignSurface (2)
MainForm.cs (2)
281bindingSource.DataSource = new List<string> { "a1", "b2", "c3", "d4", "e5", "f6" }; 361DataSource = new List<string> { "Item 1", "Item 2", "Item 3" }
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\BindingSourceDesigner.cs (1)
70bindingSource.DataSource = null;
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
736bindingSource.DataSource = dataSource; 1256bs.DataSource = dataSource;
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\BindingSourceDesignerTests.cs (1)
39using BindingSource bindingSource = new() { DataSource = componentMock.Object };
System.Windows.Forms.Tests (4)
BindingNavigatorTests.cs (2)
25bindingSource.DataSource = data; 226return new() { DataSource = dt };
System\Windows\Forms\BindingSourceTests.cs (1)
687((BindingSource)source).DataSource = newDataSource;
System\Windows\Forms\DataGridViewTests.cs (1)
2884return new() { DataSource = dt };
14 references to DataSource
System.Windows.Forms (6)
System\Windows\Forms\Control.cs (1)
726/// the relevant data from the data context to a BindingSource component's <see cref="BindingSource.DataSource"/>.
System\Windows\Forms\DataBinding\BindingSource.cs (5)
12[DefaultProperty(nameof(DataSource))] 14[ComplexBindingProperties(nameof(DataSource), nameof(DataMember))] 500bindingSource = bindingSource.DataSource as BindingSource; 1374if (DataSource is ISupportInitializeNotification dsInit && !dsInit.IsInitialized) 1392if (DataSource is ISupportInitializeNotification dsInit)
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\BindingSourceDesigner.cs (1)
57if (Component is BindingSource bindingSource && bindingSource.DataSource == e.Component)
System.Windows.Forms.Tests (7)
System\Windows\Forms\BindingSourceTests.cs (7)
32Assert.Null(source.DataSource); 91Assert.Same(dataSource, source.DataSource); 156Assert.Same(dataSource, source.DataSource); 242Assert.Same(dataSource, source.DataSource); 312Assert.Same(dataSource, source.DataSource); 421Assert.Same(mockList.Object, source.DataSource); 495Assert.Null(source.DataSource);