1 override of SelectionMode
System.Windows.Forms (1)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
188
public override SelectionMode
SelectionMode
125 writes to SelectionMode
System.Windows.Forms (1)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
202
base.
SelectionMode
= value;
System.Windows.Forms.Design (1)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
430
_listBox.
SelectionMode
= (CanSelectMultipleInstances() ? SelectionMode.MultiExtended : SelectionMode.One);
System.Windows.Forms.Tests (122)
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (4)
167
listBox.
SelectionMode
= mode;
188
listBox.
SelectionMode
= mode;
205
listBox.
SelectionMode
= SelectionMode.MultiSimple;
314
using ListBox listBox = new() {
SelectionMode
= multipleSelection ? SelectionMode.MultiExtended : SelectionMode.One };
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (48)
770
SelectionMode
= selectionMode
839
SelectionMode
= selectionMode,
1052
SelectionMode
= selectionMode
1151
SelectionMode
= selectionMode,
1856
SelectionMode
= selectionMode
1900
SelectionMode
= selectionMode,
2028
SelectionMode
= selectionMode
2088
SelectionMode
= selectionMode,
2597
SelectionMode
= selectionMode
2632
SelectionMode
= selectionMode,
2750
SelectionMode
= selectionMode
2798
SelectionMode
= selectionMode,
3301
SelectionMode
= selectionMode
3341
SelectionMode
= selectionMode,
3474
SelectionMode
= selectionMode
3527
SelectionMode
= selectionMode,
4673
SelectionMode
= selectionMode
4717
SelectionMode
= selectionMode,
4843
SelectionMode
= selectionMode
4903
SelectionMode
= selectionMode,
5623
SelectionMode
= selectionMode
5675
SelectionMode
= selectionMode,
5848
SelectionMode
= selectionMode
5916
SelectionMode
= selectionMode,
6478
SelectionMode
= selectionMode
6530
SelectionMode
= selectionMode,
6703
SelectionMode
= selectionMode
6771
SelectionMode
= selectionMode,
7575
SelectionMode
= selectionMode
7644
SelectionMode
= selectionMode,
7857
SelectionMode
= selectionMode
7956
SelectionMode
= selectionMode,
8661
SelectionMode
= selectionMode
8705
SelectionMode
= selectionMode,
8833
SelectionMode
= selectionMode
8893
SelectionMode
= selectionMode,
9995
SelectionMode
= selectionMode
10039
SelectionMode
= selectionMode,
10165
SelectionMode
= selectionMode
10225
SelectionMode
= selectionMode,
10945
SelectionMode
= selectionMode
10997
SelectionMode
= selectionMode,
11170
SelectionMode
= selectionMode
11238
SelectionMode
= selectionMode,
11800
SelectionMode
= selectionMode
11852
SelectionMode
= selectionMode,
12025
SelectionMode
= selectionMode
12093
SelectionMode
= selectionMode,
System\Windows\Forms\ListBoxTests.cs (70)
301
SelectionMode
= selectionMode
2299
SelectionMode
= selectionMode
2312
SelectionMode
= selectionMode
2328
SelectionMode
= selectionMode,
2351
SelectionMode
= SelectionMode.One
2396
SelectionMode
= selectionMode
2494
SelectionMode
= SelectionMode.One
2558
SelectionMode
= selectionMode
2621
SelectionMode
= SelectionMode.One
2648
SelectionMode
= selectionMode
2683
SelectionMode
= selectionMode
2751
SelectionMode
= SelectionMode.None
2762
SelectionMode
= selectionMode
2775
SelectionMode
= selectionMode
2794
SelectionMode
= selectionMode,
2817
SelectionMode
= SelectionMode.One
2870
SelectionMode
= selectionMode
2985
SelectionMode
= SelectionMode.One
3060
SelectionMode
= selectionMode
3134
SelectionMode
= SelectionMode.One
3165
SelectionMode
= selectionMode
3207
SelectionMode
= selectionMode
3263
SelectionMode
= SelectionMode.None
3274
SelectionMode
= SelectionMode.None
3292
SelectionMode
= SelectionMode.MultiSimple
3361
SelectionMode
= value
3371
control.
SelectionMode
= value;
3397
SelectionMode
= selectionMode
3400
control.
SelectionMode
= value;
3409
control.
SelectionMode
= value;
3429
control.
SelectionMode
= value;
3438
control.
SelectionMode
= value;
3447
control.
SelectionMode
= SelectionMode.One;
3465
control.
SelectionMode
= SelectionMode.None;
3474
control.
SelectionMode
= SelectionMode.None;
3483
control.
SelectionMode
= SelectionMode.One;
3499
SelectionMode
= selectionMode
3507
control.
SelectionMode
= SelectionMode.One;
3516
control.
SelectionMode
= SelectionMode.One;
3525
control.
SelectionMode
= selectionMode;
3541
SelectionMode
= selectionMode
3549
control.
SelectionMode
= SelectionMode.None;
3558
control.
SelectionMode
= SelectionMode.None;
3567
control.
SelectionMode
= selectionMode;
3592
control.
SelectionMode
= value;
3603
control.
SelectionMode
= value;
3644
SelectionMode
= selectionMode
3654
control.
SelectionMode
= value;
3666
control.
SelectionMode
= value;
3696
control.
SelectionMode
= value;
3708
control.
SelectionMode
= value;
3720
control.
SelectionMode
= SelectionMode.One;
3748
control.
SelectionMode
= SelectionMode.None;
3760
control.
SelectionMode
= SelectionMode.None;
3772
control.
SelectionMode
= SelectionMode.One;
3791
SelectionMode
= selectionMode
3806
control.
SelectionMode
= SelectionMode.One;
3818
control.
SelectionMode
= SelectionMode.One;
3830
control.
SelectionMode
= selectionMode;
3849
SelectionMode
= selectionMode
3864
control.
SelectionMode
= SelectionMode.None;
3876
control.
SelectionMode
= SelectionMode.None;
3888
control.
SelectionMode
= selectionMode;
3905
Assert.Throws<InvalidEnumArgumentException>("value", () => control.
SelectionMode
= value);
4162
SelectionMode
= selectionMode
4218
control.
SelectionMode
= selectionMode;
6155
using ListBox listBox = new() {
SelectionMode
= mode };
6231
using ListBox listBox = new() {
SelectionMode
= mode };
6324
listBox.
SelectionMode
= SelectionMode.None;
6341
listBox.
SelectionMode
= selectionMode;
WinFormsControlsTest (1)
ListBoxes.Designer.cs (1)
68
this.listBox1.
SelectionMode
= SelectionMode.MultiSimple;
43 references to SelectionMode
System.Windows.Forms (10)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
190
get => base.
SelectionMode
;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (3)
37
=> this.IsOwnerHandleCreated(out ListBox? owner) && owner.
SelectionMode
!= SelectionMode.None;
41
&& owner.
SelectionMode
!= SelectionMode.One
42
&& owner.
SelectionMode
!= SelectionMode.None;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (4)
1062
if (
SelectionMode
!= SelectionMode.None && SelectedItem is not null)
1084
if (
SelectionMode
!= SelectionMode.None && value is not null && (SelectedItem is null || !value.Equals(GetItemText(SelectedItem))))
1937
if (
SelectionMode
!= SelectionMode.None && DataManager is not null)
2007
if (
SelectionMode
!= SelectionMode.None)
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (2)
186
|| _owningListBox.
SelectionMode
== SelectionMode.None
187
|| _owningListBox.
SelectionMode
== SelectionMode.One
System.Windows.Forms.Tests (33)
System\Windows\Forms\ListBoxTests.cs (33)
116
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3363
Assert.Equal(value, control.
SelectionMode
);
3372
Assert.Equal(value, control.
SelectionMode
);
3401
Assert.Equal(value, control.
SelectionMode
);
3410
Assert.Equal(value, control.
SelectionMode
);
3430
Assert.Equal(value, control.
SelectionMode
);
3439
Assert.Equal(value, control.
SelectionMode
);
3448
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3466
Assert.Equal(SelectionMode.None, control.
SelectionMode
);
3475
Assert.Equal(SelectionMode.None, control.
SelectionMode
);
3484
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3508
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3517
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3526
Assert.Equal(selectionMode, control.
SelectionMode
);
3550
Assert.Equal(SelectionMode.None, control.
SelectionMode
);
3559
Assert.Equal(SelectionMode.None, control.
SelectionMode
);
3568
Assert.Equal(selectionMode, control.
SelectionMode
);
3593
Assert.Equal(value, control.
SelectionMode
);
3604
Assert.Equal(value, control.
SelectionMode
);
3655
Assert.Equal(value, control.
SelectionMode
);
3667
Assert.Equal(value, control.
SelectionMode
);
3697
Assert.Equal(value, control.
SelectionMode
);
3709
Assert.Equal(value, control.
SelectionMode
);
3721
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3749
Assert.Equal(SelectionMode.None, control.
SelectionMode
);
3761
Assert.Equal(SelectionMode.None, control.
SelectionMode
);
3773
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3807
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3819
Assert.Equal(SelectionMode.One, control.
SelectionMode
);
3831
Assert.Equal(selectionMode, control.
SelectionMode
);
3865
Assert.Equal(SelectionMode.None, control.
SelectionMode
);
3877
Assert.Equal(SelectionMode.None, control.
SelectionMode
);
3889
Assert.Equal(selectionMode, control.
SelectionMode
);