89 references to AutoCompleteSource
System.Windows.Forms (46)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (13)
95
private
AutoCompleteSource
_autoCompleteSource =
AutoCompleteSource
.None;
148
&& AutoCompleteSource !=
AutoCompleteSource
.ListItems
175
[DefaultValue(
AutoCompleteSource
.None)]
179
public
AutoCompleteSource
AutoCompleteSource
191
&& value !=
AutoCompleteSource
.ListItems)
1055
&& AutoCompleteSource !=
AutoCompleteSource
.ListItems
1863
if (_updateCount == 0 && AutoCompleteSource ==
AutoCompleteSource
.ListItems)
2694
if (AutoCompleteSource ==
AutoCompleteSource
.CustomSource)
2743
&& AutoCompleteSource ==
AutoCompleteSource
.ListItems
2964
&& AutoCompleteSource ==
AutoCompleteSource
.ListItems
3137
if (AutoCompleteSource ==
AutoCompleteSource
.CustomSource)
3169
if (AutoCompleteSource ==
AutoCompleteSource
.ListItems)
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (6)
108
if (_owner.UpdateNeeded() && _owner.AutoCompleteSource ==
AutoCompleteSource
.ListItems)
203
if (_owner.AutoCompleteSource ==
AutoCompleteSource
.ListItems)
250
if (_owner.AutoCompleteSource ==
AutoCompleteSource
.ListItems)
339
if (_owner.AutoCompleteSource ==
AutoCompleteSource
.ListItems)
385
if (_owner.AutoCompleteSource ==
AutoCompleteSource
.ListItems)
431
if (_owner.AutoCompleteSource ==
AutoCompleteSource
.ListItems)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
112
EditingComboBox.AutoCompleteSource =
AutoCompleteSource
.ListItems;
118
EditingComboBox.AutoCompleteSource =
AutoCompleteSource
.None;
1304
comboBox.AutoCompleteSource =
AutoCompleteSource
.ListItems;
1310
comboBox.AutoCompleteSource =
AutoCompleteSource
.None;
System\Windows\Forms\Controls\TextBox\TextBox.cs (18)
69
private
AutoCompleteSource
_autoCompleteSource =
AutoCompleteSource
.None;
139
[DefaultValue(
AutoCompleteSource
.None)]
144
public
AutoCompleteSource
AutoCompleteSource
154
case
AutoCompleteSource
.None:
155
case
AutoCompleteSource
.AllSystemSources:
156
case
AutoCompleteSource
.AllUrl:
157
case
AutoCompleteSource
.CustomSource:
158
case
AutoCompleteSource
.FileSystem:
159
case
AutoCompleteSource
.FileSystemDirectories:
160
case
AutoCompleteSource
.HistoryList:
161
case
AutoCompleteSource
.RecentlyUsedList:
165
case
AutoCompleteSource
.ListItems:
168
throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(
AutoCompleteSource
));
549
if (AutoCompleteSource ==
AutoCompleteSource
.CustomSource)
730
if (Multiline || _passwordChar != 0 || _useSystemPasswordChar || AutoCompleteSource ==
AutoCompleteSource
.None)
747
if (AutoCompleteSource ==
AutoCompleteSource
.CustomSource)
810
PInvoke.SHAutoComplete(this, (SHELL_AUTOCOMPLETE_FLAGS)
AutoCompleteSource
.AllSystemSources | SHELL_AUTOCOMPLETE_FLAGS.SHACF_AUTOSUGGEST_FORCE_OFF | SHELL_AUTOCOMPLETE_FLAGS.SHACF_AUTOAPPEND_FORCE_OFF);
System\Windows\Forms\Controls\TextBox\TextBoxAutoCompleteSourceConverter.cs (1)
26
if (!string.Equals(currentItem.ToString(), nameof(
AutoCompleteSource
.ListItems)))
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (2)
73
[DefaultValue(
AutoCompleteSource
.None)]
77
public
AutoCompleteSource
AutoCompleteSource
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (2)
203
[DefaultValue(
AutoCompleteSource
.None)]
207
public
AutoCompleteSource
AutoCompleteSource
System.Windows.Forms.Tests (41)
System\Windows\Forms\ComboBoxTests.cs (10)
32
Assert.Equal(
AutoCompleteSource
.None, control.AutoCompleteSource);
430
using ComboBox control2 = new() { AutoCompleteSource =
AutoCompleteSource
.ListItems };
839
foreach (
AutoCompleteSource
source in Enum.GetValues(typeof(
AutoCompleteSource
)))
845
yield return new object[] { source, mode, ComboBoxStyle.DropDownList, source !=
AutoCompleteSource
.ListItems ? AutoCompleteMode.None : mode };
852
public void ComboBox_DropDownStyle_SetWithSourceAndMode_GetReturnsExpected(
AutoCompleteSource
source, AutoCompleteMode mode, ComboBoxStyle value, AutoCompleteMode expectedMode)
874
[EnumData<
AutoCompleteSource
>]
875
public void ComboBox_AutoCompleteSource_Set_GetReturnsExpected(
AutoCompleteSource
value)
883
[InvalidEnumData<
AutoCompleteSource
>]
884
public void ComboBox_AutoCompleteSource_InvalidAutoCompleteSource_ThrowsInvalidEnumArgumentException(
AutoCompleteSource
source)
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
31
Assert.Equal(
AutoCompleteSource
.None, control.AutoCompleteSource);
System\Windows\Forms\TextBoxAutoCompleteSourceConverterTests.cs (9)
15
TextBoxAutoCompleteSourceConverter converter = new(typeof(
AutoCompleteSource
));
22
value.Should().Contain(
AutoCompleteSource
.AllUrl);
23
value.Should().Contain(
AutoCompleteSource
.AllSystemSources);
24
value.Should().Contain(
AutoCompleteSource
.CustomSource);
25
value.Should().Contain(
AutoCompleteSource
.HistoryList);
26
value.Should().Contain(
AutoCompleteSource
.RecentlyUsedList);
27
value.Should().Contain(
AutoCompleteSource
.FileSystem);
28
value.Should().Contain(
AutoCompleteSource
.FileSystemDirectories);
29
value.Should().Contain(
AutoCompleteSource
.None);
System\Windows\Forms\ToolStripComboBoxTests.cs (10)
126
[InlineData(
AutoCompleteSource
.None)]
127
[InlineData(
AutoCompleteSource
.AllSystemSources)]
128
[InlineData(
AutoCompleteSource
.AllUrl)]
129
[InlineData(
AutoCompleteSource
.CustomSource)]
130
[InlineData(
AutoCompleteSource
.FileSystem)]
131
[InlineData(
AutoCompleteSource
.FileSystemDirectories)]
132
[InlineData(
AutoCompleteSource
.HistoryList)]
133
[InlineData(
AutoCompleteSource
.RecentlyUsedList)]
134
[InlineData(
AutoCompleteSource
.ListItems)]
135
public void ToolStripComboBox_AutoCompleteSource_SetAndGet(
AutoCompleteSource
source)
System\Windows\Forms\ToolStripTextBoxTests.cs (3)
214
[InlineData(
AutoCompleteSource
.AllSystemSources)]
215
[InlineData(
AutoCompleteSource
.None)]
216
public void ToolStripTextBox_AutoCompleteSource_GetSet_ReturnsExpected(
AutoCompleteSource
autoCompleteSource)
TextBoxTests.cs (8)
30
Assert.Equal(
AutoCompleteSource
.None, control.AutoCompleteSource);
271
[EnumData<
AutoCompleteSource
>]
272
public void TextBox_AutoCompleteSource_Set_GetReturnsExpected(
AutoCompleteSource
value)
276
AutoCompleteSource = value ==
AutoCompleteSource
.ListItems ?
AutoCompleteSource
.None : value
279
if (value !=
AutoCompleteSource
.ListItems)
286
[InvalidEnumData<
AutoCompleteSource
>]
287
public void TextBox_AutoCompleteSource_InvalidAutoCompleteSource_ThrowsInvalidEnumArgumentException(
AutoCompleteSource
source)
System.Windows.Forms.UI.IntegrationTests (2)
ComboBoxTests.cs (2)
27
comboBox.AutoCompleteSource =
AutoCompleteSource
.CustomSource;
28
comboBox.AutoCompleteSource =
AutoCompleteSource
.CustomSource;