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