60 references to One
System.Windows.Forms (13)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
195
if (value is not SelectionMode.
One
and not SelectionMode.None)
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (1)
41
&& owner.SelectionMode != SelectionMode.
One
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (9)
69
private SelectionMode _selectionMode = SelectionMode.
One
;
71
private SelectionMode _cachedSelectionMode = SelectionMode.
One
;
320
case SelectionMode.
One
:
837
if (current == SelectionMode.
One
&& IsHandleCreated)
859
if (_selectionMode == SelectionMode.
One
&& value != -1)
989
[DefaultValue(SelectionMode.
One
)]
1637
if (_selectionMode == SelectionMode.
One
)
1665
case SelectionMode.
One
:
1793
if (_selectedItems.Count > 0 && _selectionMode == SelectionMode.
One
)
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (1)
187
|| _owningListBox.SelectionMode == SelectionMode.
One
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedObjectCollection.cs (1)
44
case SelectionMode.
One
:
System.Windows.Forms.Design (1)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
430
_listBox.SelectionMode = (CanSelectMultipleInstances() ? SelectionMode.MultiExtended : SelectionMode.
One
);
System.Windows.Forms.Tests (46)
CheckedListBoxTests.cs (1)
93
[InlineData(SelectionMode.
One
)]
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (3)
160
[InlineData(SelectionMode.
One
, true)]
181
[InlineData(SelectionMode.
One
, false)]
314
using ListBox listBox = new() { SelectionMode = multipleSelection ? SelectionMode.MultiExtended : SelectionMode.
One
};
System\Windows\Forms\ListBoxTests.cs (42)
116
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
296
[InlineData(SelectionMode.
One
, 0x562100C1)]
2323
[InlineData(SelectionMode.
One
)]
2351
SelectionMode = SelectionMode.
One
2494
SelectionMode = SelectionMode.
One
2621
SelectionMode = SelectionMode.
One
2676
[InlineData(SelectionMode.
One
)]
2786
[InlineData(SelectionMode.
One
, null)]
2789
[InlineData(SelectionMode.
One
, "item")]
2817
SelectionMode = SelectionMode.
One
2985
SelectionMode = SelectionMode.
One
3134
SelectionMode = SelectionMode.
One
3200
[InlineData(SelectionMode.
One
)]
3447
control.SelectionMode = SelectionMode.
One
;
3448
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
3483
control.SelectionMode = SelectionMode.
One
;
3484
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
3507
control.SelectionMode = SelectionMode.
One
;
3508
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
3516
control.SelectionMode = SelectionMode.
One
;
3517
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
3580
[InlineData(SelectionMode.
One
, 0)]
3620
yield return new object[] { SelectionMode.None, SelectionMode.
One
, 1 };
3625
yield return new object[] { SelectionMode.MultiExtended, SelectionMode.
One
, 1 };
3630
yield return new object[] { SelectionMode.MultiSimple, SelectionMode.
One
, 1 };
3632
yield return new object[] { SelectionMode.
One
, SelectionMode.None, 1 };
3633
yield return new object[] { SelectionMode.
One
, SelectionMode.MultiExtended, 1 };
3634
yield return new object[] { SelectionMode.
One
, SelectionMode.MultiSimple, 1 };
3635
yield return new object[] { SelectionMode.
One
, SelectionMode.
One
, 0 };
3720
control.SelectionMode = SelectionMode.
One
;
3721
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
3772
control.SelectionMode = SelectionMode.
One
;
3773
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
3806
control.SelectionMode = SelectionMode.
One
;
3807
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
3818
control.SelectionMode = SelectionMode.
One
;
3819
Assert.Equal(SelectionMode.
One
, control.SelectionMode);
4143
foreach (SelectionMode selectionMode in new SelectionMode[] { SelectionMode.MultiExtended, SelectionMode.MultiSimple, SelectionMode.
One
})
4191
foreach (SelectionMode selectionMode in new SelectionMode[] { SelectionMode.MultiExtended, SelectionMode.MultiSimple, SelectionMode.
One
})
4202
yield return new object[] { formattingEnabled, SelectionMode.
One
, "item2", "item2", 1 };
6335
[InlineData(SelectionMode.
One
)]