114 writes to DataSource
Accessibility_Core_App (1)
DataBindingExample.cs (1)
33listBox1.DataSource = _studentA;
DesignSurface (1)
MainForm.cs (1)
279listBox.DataSource = bindingSource;
PresentationUI (1)
MS\Internal\Documents\CredentialManagerDialog.cs (1)
70_credListBox.DataSource = accountList;
System.Windows.Forms (2)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
397set => base.DataSource = value;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
114set => base.DataSource = value;
System.Windows.Forms.Tests (109)
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (1)
27DataSource = TestDataSources.GetPersons()
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (14)
59DataSource = Array.Empty<object>() 2192DataSource = Array.Empty<object>() 3665DataSource = Array.Empty<object>() 5030DataSource = Array.Empty<object>() 5982DataSource = Array.Empty<object>() 5993DataSource = new object[] { 1 } 6862DataSource = Array.Empty<object>() 6873DataSource = new object[] { 1 } 8997DataSource = Array.Empty<object>() 10352DataSource = Array.Empty<object>() 11304DataSource = Array.Empty<object>() 11315DataSource = new object[] { 1 } 12184DataSource = Array.Empty<object>() 12195DataSource = new object[] { 1 }
System\Windows\Forms\ListBoxTests.cs (10)
799DataSource = value 807control.DataSource = value; 837control.DataSource = dataSource1; 843control.DataSource = dataSource1; 850control.DataSource = dataSource2; 856control.DataSource = null; 864control.DataSource = dataSource1; 2447DataSource = dataSource, 2929DataSource = dataSource, 5823DataSource = dataSource,
System\Windows\Forms\ListControlTests.cs (84)
195DataSource = dataSource 221DataSource = dataSource, 250DataSource = dataSource 278DataSource = dataSource, 347DataSource = dataSource 363DataSource = dataSource, 379DataSource = dataSource 412control.DataSource = new List<DataClass>(); 424DataSource = dataSource 439control.DataSource = new List<DataClass>(); 455DataSource = dataSource 497DataSource = dataSource 524DataSource = dataSource 540control.DataSource = new List<DataClass>(); 566DataSource = value 574control.DataSource = value; 587DataSource = new List<int>() 590control.DataSource = value; 597control.DataSource = value; 613control.DataSource = value; 620control.DataSource = value; 634DataSource = originalValue, 638control.DataSource = value; 645control.DataSource = value; 658DataSource = value, 677DataSource = value, 696DataSource = value, 716DataSource = originalValue, 723control.DataSource = value; 741DataSource = value, 760DataSource = value, 779DataSource = value, 798DataSource = value, 817DataSource = value, 838DataSource = originalValue, 846control.DataSource = value; 863control.DataSource = value; 876control.DataSource = value; 897DataSource = new List<int>() 900control.DataSource = value; 913control.DataSource = value; 937control.DataSource = value; 943control.DataSource = value; 960control.DataSource = value; 973control.DataSource = value; 1009control.DataSource = dataSource1; 1015control.DataSource = dataSource1; 1022control.DataSource = dataSource2; 1028control.DataSource = null; 1036control.DataSource = dataSource1; 1049control.DataSource = Array.Empty<int>(); 1055control.DataSource = value; 1065Assert.Throws<ArgumentException>("value", () => control.DataSource = new object()); 1119DataSource = dataSource 1169DataSource = dataSource 1198DataSource = dataSource 1225DataSource = dataSource 1766DataSource = dataSource 1793DataSource = dataSource 1813DataSource = dataSource, 1841DataSource = dataSource, 1923DataSource = dataSource 1956DataSource = dataSource 1981DataSource = dataSource 2011control.DataSource = new List<int>(); 2026DataSource = dataSource 2064DataSource = dataSource, 2083DataSource = dataSource 2152DataSource = list 2163DataSource = list 2173DataSource = list, 2184DataSource = list, 2195DataSource = list, 2206DataSource = list, 2276DataSource = list 2287DataSource = list 2298DataSource = list 2309DataSource = list 2320DataSource = list 2478DataSource = new List<CustomTypeConverterDataClass> { item }, 2495DataSource = new List<CustomTypeConverterDataClass> { item }, 2511DataSource = new List<CustomTypeConverterDataClass> { item }, 2528DataSource = new List<NonCriticalThrowingTypeConverterDataClass> { item }, 2545DataSource = new List<CriticalThrowingTypeConverterDataClass> { item },
96 references to DataSource
System.Windows.Forms (7)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
396get => base.DataSource;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
113get => base.DataSource;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (3)
1277if (DataSource is not null) 1918if (DataSource is null) 2111if (DataSource is ICurrencyManagerProvider)
System\Windows\Forms\Controls\ListControl\ListControl.cs (2)
11[LookupBindingProperties(nameof(DataSource), nameof(DisplayMember), nameof(ValueMember), nameof(SelectedValue))] 311SetDataConnection(DataSource, newValueMember, force: false);
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\ListControlStringCollectionEditor.cs (2)
10/// to prevent the string collection from being edited if <see cref="ListControl.DataSource"/> 23if (context?.Instance is ListControl control && control.DataSource is not null)
System.Windows.Forms.Tests (87)
System\Windows\Forms\ListBoxTests.cs (8)
53Assert.Null(control.DataSource); 801Assert.Same(value, control.DataSource); 808Assert.Same(value, control.DataSource); 838Assert.Same(dataSource1, control.DataSource); 844Assert.Same(dataSource1, control.DataSource); 851Assert.Same(dataSource2, control.DataSource); 857Assert.Null(control.DataSource); 865Assert.Same(dataSource1, control.DataSource);
System\Windows\Forms\ListControlTests.cs (79)
50Assert.Null(control.DataSource); 149Assert.Null(control.DataSource); 157Assert.Null(control.DataSource); 174Assert.Null(control.DataSource); 182Assert.Null(control.DataSource); 200Assert.Same(dataSource, control.DataSource); 208Assert.Same(dataSource, control.DataSource); 227Assert.Same(dataSource, control.DataSource); 235Assert.Same(dataSource, control.DataSource); 255Assert.Same(dataSource, control.DataSource); 263Assert.Same(dataSource, control.DataSource); 284Assert.Same(dataSource, control.DataSource); 291Assert.Same(dataSource, control.DataSource); 568Assert.Same(value, control.DataSource); 575Assert.Same(value, control.DataSource); 591Assert.Same(value, control.DataSource); 598Assert.Same(value, control.DataSource); 614Assert.Same(value, control.DataSource); 621Assert.Same(value, control.DataSource); 639Assert.Same(value, control.DataSource); 646Assert.Same(value, control.DataSource); 661Assert.Same(value, control.DataSource); 666Assert.Null(control.DataSource); 680Assert.Same(value, control.DataSource); 685Assert.Null(control.DataSource); 699Assert.Same(value, control.DataSource); 704Assert.Null(control.DataSource); 719Assert.Same(originalValue, control.DataSource); 725Assert.Same(value, control.DataSource); 744Assert.Same(value, control.DataSource); 749Assert.Same(value, control.DataSource); 763Assert.Same(value, control.DataSource); 768Assert.Same(value, control.DataSource); 782Assert.Same(value, control.DataSource); 787Assert.Same(value, control.DataSource); 801Assert.Same(value, control.DataSource); 806Assert.Same(value, control.DataSource); 820Assert.Same(value, control.DataSource); 825Assert.Same(value, control.DataSource); 841Assert.Same(originalValue, control.DataSource); 848Assert.Same(value, control.DataSource); 864Assert.Same(value, control.DataSource); 877Assert.Same(value, control.DataSource); 901Assert.Same(value, control.DataSource); 914Assert.Same(value, control.DataSource); 938Assert.Same(value, control.DataSource); 944Assert.Same(value, control.DataSource); 961Assert.Same(value, control.DataSource); 974Assert.Same(value, control.DataSource); 1010Assert.Same(dataSource1, control.DataSource); 1016Assert.Same(dataSource1, control.DataSource); 1023Assert.Same(dataSource2, control.DataSource); 1029Assert.Null(control.DataSource); 1037Assert.Same(dataSource1, control.DataSource); 1056Assert.Same(value, control.DataSource); 1076Assert.Null(control.DataSource); 1083Assert.Null(control.DataSource); 1100Assert.Null(control.DataSource); 1107Assert.Null(control.DataSource); 1124Assert.Same(dataSource, control.DataSource); 1131Assert.Same(dataSource, control.DataSource); 1148Assert.Null(control.DataSource); 1155Assert.Null(control.DataSource); 1174Assert.Same(dataSource, control.DataSource); 1181Assert.Same(dataSource, control.DataSource); 1203Assert.Equal(dataSource, control.DataSource); 1210Assert.Equal(dataSource, control.DataSource); 1229Assert.Same(dataSource, control.DataSource); 1244Assert.Same(dataSource, control.DataSource); 1688Assert.Null(control.DataSource); 1696Assert.Null(control.DataSource); 1713Assert.Null(control.DataSource); 1721Assert.Null(control.DataSource); 1739Assert.Null(control.DataSource); 1747Assert.Null(control.DataSource); 1770Assert.Same(dataSource, control.DataSource); 1778Assert.Same(dataSource, control.DataSource); 1818Assert.Same(dataSource, control.DataSource); 1826Assert.Same(dataSource, control.DataSource);