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