465 references to ComboBoxStyle
Accessibility_Core_App (1)
CommonControl1.Designer.cs (1)
318
this.comboBox2.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.Simple;
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.Designer.cs (1)
177
this.comboBoxTemplates.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.DropDownList;
System.Windows.Forms (62)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxAccessibleObject.cs (7)
43
? owner.DropDownStyle !=
ComboBoxStyle
.Simple
101
if (!owner.IsHandleCreated || owner.DropDownStyle ==
ComboBoxStyle
.Simple)
227
ComboBoxStyle
.DropDown => owner.ChildEditAccessibleObject,
228
ComboBoxStyle
.DropDownList => owner.ChildTextAccessibleObject,
229
ComboBoxStyle
.Simple => null,
235
this.TryGetOwnerAs(out ComboBox? owner) && owner.DropDownStyle ==
ComboBoxStyle
.Simple
241
if (!this.IsOwnerHandleCreated(out ComboBox? owner) || owner.DropDownStyle ==
ComboBoxStyle
.Simple)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildDropDownButtonUiaProvider.cs (1)
63
_owner.DropDownStyle ==
ComboBoxStyle
.DropDownList
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildEditUiaProvider.cs (1)
56
=> _owningComboBox.DropDownStyle !=
ComboBoxStyle
.Simple
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (2)
86
return _owningComboBox.DropDownStyle ==
ComboBoxStyle
.DropDownList
91
return _owningComboBox.DropDownStyle ==
ComboBoxStyle
.Simple
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (45)
147
if (DropDownStyle ==
ComboBoxStyle
.DropDownList
189
if (DropDownStyle ==
ComboBoxStyle
.DropDownList
309
new ComboBoxChildListUiaProvider(this, DropDownStyle ==
ComboBoxStyle
.Simple ? _childListBox!.HWND : _dropDownHandle);
344
case
ComboBoxStyle
.Simple:
347
case
ComboBoxStyle
.DropDown:
352
case
ComboBoxStyle
.DropDownList:
789
if (DropDownStyle ==
ComboBoxStyle
.Simple)
947
get => DropDownStyle ==
ComboBoxStyle
.DropDownList ? string.Empty : Text.Substring(SelectionStart, SelectionLength);
950
if (DropDownStyle !=
ComboBoxStyle
.DropDownList)
1038
[DefaultValue(
ComboBoxStyle
.DropDown)]
1041
public
ComboBoxStyle
DropDownStyle
1043
get => Properties.GetValueOrDefault(s_propStyle,
ComboBoxStyle
.DropDown);
1053
if (value ==
ComboBoxStyle
.DropDownList
1063
Properties.AddOrRemoveValue(s_propStyle, value, defaultValue:
ComboBoxStyle
.DropDown);
1105
if (DropDownStyle ==
ComboBoxStyle
.DropDownList && !IsHandleCreated && !string.IsNullOrEmpty(value) && FindStringExact(value) == -1)
1204
return ((_autoCompleteMode != AutoCompleteMode.None) && (DropDownStyle !=
ComboBoxStyle
.DropDownList));
1393
if (DropDownStyle ==
ComboBoxStyle
.Simple && m.HWnd == _childListBox!.Handle)
1412
if (DropDownStyle ==
ComboBoxStyle
.Simple && m.HWnd == _childListBox!.Handle)
1452
if (DropDownStyle ==
ComboBoxStyle
.Simple && m.HWnd == _childListBox!.Handle)
1477
if (DropDownStyle ==
ComboBoxStyle
.Simple && m.HWnd == _childListBox!.Handle)
1926
if (DropDownStyle is
ComboBoxStyle
.DropDown
1927
or
ComboBoxStyle
.DropDownList)
1974
return DropDownStyle ==
ComboBoxStyle
.Simple ? new(_childListBox) : new(this, _dropDownHandle);
1979
return DropDownStyle ==
ComboBoxStyle
.Simple ? _childListBox! : _childDropDown!;
2169
if (DropDownStyle !=
ComboBoxStyle
.DropDownList)
2231
if (DropDownStyle ==
ComboBoxStyle
.DropDownList && SelectedIndex == index)
2281
if (ok && DropDownStyle !=
ComboBoxStyle
.DropDownList)
2287
if (DropDownStyle ==
ComboBoxStyle
.Simple)
2318
if (DropDownStyle ==
ComboBoxStyle
.Simple)
2594
&& (DropDownStyle ==
ComboBoxStyle
.DropDownList || DropDownStyle ==
ComboBoxStyle
.DropDown))
2662
if (DropDownStyle ==
ComboBoxStyle
.Simple)
2742
&& DropDownStyle ==
ComboBoxStyle
.DropDownList)
2801
if (DropDownStyle ==
ComboBoxStyle
.Simple && recreate)
2821
if (DropDownStyle ==
ComboBoxStyle
.Simple && IsHandleCreated)
2880
if (DropDownStyle ==
ComboBoxStyle
.DropDown)
2887
if (DropDownStyle ==
ComboBoxStyle
.DropDownList)
2937
if (DropDownStyle !=
ComboBoxStyle
.DropDownList
2963
&& DropDownStyle ==
ComboBoxStyle
.DropDownList
3169
if (DropDownStyle ==
ComboBoxStyle
.DropDownList)
3172
Debug.Assert(DropDownStyle ==
ComboBoxStyle
.DropDownList);
3260
if ((specified & BoundsSpecified.Height) != BoundsSpecified.None && DropDownStyle ==
ComboBoxStyle
.Simple)
3438
if (DropDownStyle ==
ComboBoxStyle
.DropDown)
3449
if ((DropDownStyle ==
ComboBoxStyle
.Simple) && ParentInternal is not null)
3661
&& DropDownStyle ==
ComboBoxStyle
.DropDownList
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (2)
69
if (comboBox.DropDownStyle ==
ComboBoxStyle
.Simple)
114
if (comboBox.DropDownStyle ==
ComboBoxStyle
.Simple)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1278
comboBox.DropDownStyle =
ComboBoxStyle
.DropDownList;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.DataGridViewComboBoxEditingControlAccessibleObject.cs (1)
57
=> owner.DropDownStyle !=
ComboBoxStyle
.Simple,
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (2)
155
[DefaultValue(
ComboBoxStyle
.DropDown)]
158
public
ComboBoxStyle
DropDownStyle
System.Windows.Forms.Design (7)
System\Windows\Forms\Design\ComboBoxDesigner.cs (4)
109
ComboBoxStyle
style =
ComboBoxStyle
.Simple;
114
if (style is
ComboBoxStyle
.DropDown or
ComboBoxStyle
.DropDownList)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
434
_columnTypesCombo.DropDownStyle =
ComboBoxStyle
.DropDownList;
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
194
_keyComboBox.DropDownStyle =
ComboBoxStyle
.DropDownList;
System\Windows\Forms\Design\StyleEditorForm.cs (1)
294
_columnsOrRowsComboBox.DropDownStyle =
ComboBoxStyle
.DropDownList;
System.Windows.Forms.Interop.Tests (1)
AccessibleObjectTests.cs (1)
446
DropDownStyle =
ComboBoxStyle
.DropDown
System.Windows.Forms.Tests (381)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxAccessibleObjectTests.cs (35)
30
[InlineData(
ComboBoxStyle
.DropDown)]
31
[InlineData(
ComboBoxStyle
.DropDownList)]
32
public void ComboBoxAccessibleObject_ExpandCollapse_Set_CollapsedState_IfControlIsCreated(
ComboBoxStyle
comboBoxStyle)
53
[InlineData(
ComboBoxStyle
.DropDown)]
54
[InlineData(
ComboBoxStyle
.DropDownList)]
55
public void ComboBoxAccessibleObject_ExpandCollapse_Set_CollapsedState_IfControlIsNotCreated(
ComboBoxStyle
comboBoxStyle)
78
[InlineData(
ComboBoxStyle
.DropDown)]
79
[InlineData(
ComboBoxStyle
.DropDownList)]
80
[InlineData(
ComboBoxStyle
.Simple)]
81
public void ComboBoxAccessibleObject_FragmentNavigate_FirstChild_ReturnNull_IfHandleNotCreated(
ComboBoxStyle
comboBoxStyle)
126
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
132
bool childListDisplayed = droppedDown || comboBoxStyle ==
ComboBoxStyle
.Simple;
142
ComboBoxStyle
comboBoxStyle,
167
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
181
public void ComboBoxAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected(
ComboBoxStyle
comboBoxStyle, bool createControl, bool droppedDown)
195
AccessibleObject expectedLastChild = comboBoxStyle ==
ComboBoxStyle
.Simple
205
[InlineData(
ComboBoxStyle
.DropDown)]
206
[InlineData(
ComboBoxStyle
.DropDownList)]
207
[InlineData(
ComboBoxStyle
.Simple)]
208
public void ComboBoxAccessibleObject_FragmentNavigate_LastChild_ReturnNull_IfHandleNotCreated(
ComboBoxStyle
comboBoxStyle)
327
using ComboBox comboBox = new() { DropDownStyle =
ComboBoxStyle
.Simple };
336
yield return new object[] {
ComboBoxStyle
.DropDown, false, SR.AccessibleActionExpand };
337
yield return new object[] {
ComboBoxStyle
.DropDown, true, SR.AccessibleActionCollapse };
338
yield return new object[] {
ComboBoxStyle
.DropDownList, false, SR.AccessibleActionExpand };
339
yield return new object[] {
ComboBoxStyle
.DropDownList, true, SR.AccessibleActionCollapse };
344
public void ComboBoxAccessibleObject_DefaultAction_IfHandleIsCreated_ReturnsExpected(
ComboBoxStyle
style, bool droppedDown, string expectedAction)
356
public void ComboBoxAccessibleObject_GetPropertyValue_IfHandleIsCreated_ReturnsExpected(
ComboBoxStyle
style, bool droppedDown, string expectedAction)
382
using ComboBox comboBox = new() { DropDownStyle =
ComboBoxStyle
.Simple };
394
[InlineData(
ComboBoxStyle
.DropDown, false, true)]
395
[InlineData(
ComboBoxStyle
.DropDown, true, false)]
396
[InlineData(
ComboBoxStyle
.DropDownList, false, true)]
397
[InlineData(
ComboBoxStyle
.DropDownList, true, false)]
398
public void ComboBoxAccessibleObject_DoDefaultAction_IfHandleIsCreated_DoesExpected(
ComboBoxStyle
style, bool droppedDown, bool expectedDroppedDown)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (62)
82
[InlineData(
ComboBoxStyle
.DropDown)]
83
[InlineData(
ComboBoxStyle
.DropDownList)]
84
[InlineData(
ComboBoxStyle
.Simple)]
85
public void ComboBoxItemAccessibleObject_SeveralSameItems_FragmentNavigate_NextSibling_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
121
[InlineData(
ComboBoxStyle
.DropDown)]
122
[InlineData(
ComboBoxStyle
.DropDownList)]
123
[InlineData(
ComboBoxStyle
.Simple)]
124
public void ComboBoxItemAccessibleObject_SeveralSameItems_FragmentNavigate_PreviousSibling_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
166
[InlineData(
ComboBoxStyle
.DropDown)]
167
[InlineData(
ComboBoxStyle
.DropDownList)]
168
[InlineData(
ComboBoxStyle
.Simple)]
169
public void ComboBoxItemAccessibleObject_FragmentNavigate_Parent_ReturnListAccessibleObject(
ComboBoxStyle
comboBoxStyle)
179
[InlineData(
ComboBoxStyle
.DropDown)]
180
[InlineData(
ComboBoxStyle
.DropDownList)]
181
[InlineData(
ComboBoxStyle
.Simple)]
182
public void ComboBoxItemAccessibleObject_FragmentNavigate_Child_ReturnNull(
ComboBoxStyle
comboBoxStyle)
234
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
242
public void ComboBoxItemAccessibleObject_ScrollIntoView_DoNothing_IfControlIsNotEnabled(
ComboBoxStyle
comboBoxStyle)
251
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
277
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
291
public void ComboBoxItemAccessibleObject_ScrollIntoView_EnsureVisible(
ComboBoxStyle
comboBoxStyle, bool scrollingDown, int itemIndex, int itemsCount)
303
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
365
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
371
int initialYPosition = comboBoxStyle ==
ComboBoxStyle
.Simple ? 56 : 55;
372
int x = comboBoxStyle ==
ComboBoxStyle
.Simple ? 10 : 9;
382
public void ComboBoxItemAccessibleObject_Bounds_ReturnsCorrect_IfComboBoxIsScrollable(
ComboBoxStyle
comboBoxStyle, int itemIndex, Point expectedPosition)
390
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
410
int itemWidth = comboBoxStyle ==
ComboBoxStyle
.Simple ? 79 : 81;
420
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
429
int width = comboBoxStyle ==
ComboBoxStyle
.Simple ? 96 : 81;
430
int x = comboBoxStyle ==
ComboBoxStyle
.Simple ? 10 : 9;
431
int y = comboBoxStyle ==
ComboBoxStyle
.Simple ? 57 : 56;
445
public void ComboBoxItemAccessibleObject_Bounds_ReturnsCorrect_ForDifferentHeightItems(
ComboBoxStyle
comboBoxStyle, int itemIndex, Rectangle expectedRect)
452
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
508
[InlineData(
ComboBoxStyle
.DropDownList)]
509
[InlineData(
ComboBoxStyle
.DropDown)]
510
public void ComboBoxItemAccessibleObject_MaxDropDownItems_State_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
527
[InlineData(
ComboBoxStyle
.DropDownList)]
528
[InlineData(
ComboBoxStyle
.DropDown)]
529
public void ComboBoxItemAccessibleObject_DropDownHeight_State_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
546
[InlineData(
ComboBoxStyle
.DropDownList)]
547
[InlineData(
ComboBoxStyle
.DropDown)]
548
public void ComboBoxItemAccessibleObject_DropDownCollapsed_State_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
564
using ComboBox comboBox = GetComboBoxWithMaxSize(
ComboBoxStyle
.Simple);
581
[InlineData(
ComboBoxStyle
.DropDownList)]
582
[InlineData(
ComboBoxStyle
.DropDown)]
583
public void ComboBoxItemAccessibleObject_MaxDropDownItems_GetOffScreenProperty_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
600
[InlineData(
ComboBoxStyle
.DropDownList)]
601
[InlineData(
ComboBoxStyle
.DropDown)]
602
public void ComboBoxItemAccessibleObject_DropDownHeight_GetOffScreenProperty_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
619
[InlineData(
ComboBoxStyle
.DropDownList)]
620
[InlineData(
ComboBoxStyle
.DropDown)]
621
public void ComboBoxItemAccessibleObject_DropDownCollapsed_GetOffScreenProperty_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
637
using ComboBox comboBox = GetComboBoxWithMaxSize(
ComboBoxStyle
.Simple);
651
private ComboBox GetComboBox(
ComboBoxStyle
comboBoxStyle)
665
private ComboBox GetComboBoxWithMaxItems(
ComboBoxStyle
comboBoxStyle)
675
private ComboBox GetComboBoxWithMaxHeight(
ComboBoxStyle
comboBoxStyle)
684
private ComboBox GetComboBoxWithMaxSize(
ComboBoxStyle
comboBoxStyle)
System\Windows\Forms\Application.ParkingWindowTests.cs (2)
42
DropDownStyle =
ComboBoxStyle
.DropDown
52
comboBox.DropDownStyle =
ComboBoxStyle
.DropDownList;
System\Windows\Forms\ComboBox.ComboBoxChildDropDownButtonUiaProviderTests.cs (13)
12
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
15
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
33
ComboBoxStyle
comboBoxStyle,
58
ComboBoxStyle
comboBoxStyle,
76
AccessibleObject expectedItem = comboBoxStyle ==
ComboBoxStyle
.DropDownList
85
[InlineData(
ComboBoxStyle
.Simple)]
86
[InlineData(
ComboBoxStyle
.DropDownList)]
87
[InlineData(
ComboBoxStyle
.DropDown)]
89
ComboBoxStyle
comboBoxStyle)
104
[InlineData(
ComboBoxStyle
.DropDownList)]
105
[InlineData(
ComboBoxStyle
.DropDown)]
106
public void DropDownButtonUiaProvider_Name_ReturnsExpected(
ComboBoxStyle
comboBoxStyle)
System\Windows\Forms\ComboBox.ComboBoxChildEditUiaProviderTests.cs (19)
13
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
16
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
25
bool childListDisplayed = droppedDown || comboBoxStyle ==
ComboBoxStyle
.Simple;
35
ComboBoxStyle
comboBoxStyle,
61
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
64
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
82
ComboBoxStyle
comboBoxStyle,
100
AccessibleObject expectedItem = comboBoxStyle !=
ComboBoxStyle
.Simple
109
[InlineData(
ComboBoxStyle
.DropDown)]
110
[InlineData(
ComboBoxStyle
.Simple)]
111
public void ComboBoxChildEditUiaProvider_SupportsTextPattern(
ComboBoxStyle
comboBoxStyle)
125
[InlineData(
ComboBoxStyle
.DropDown)]
126
[InlineData(
ComboBoxStyle
.Simple)]
127
public void ComboBoxChildEditUiaProvider_SupportsTextPattern2(
ComboBoxStyle
comboBoxStyle)
141
[InlineData(
ComboBoxStyle
.DropDown)]
142
[InlineData(
ComboBoxStyle
.Simple)]
143
public void ComboBoxChildEditUiaProvider_SupportsValuePattern(
ComboBoxStyle
comboBoxStyle)
System\Windows\Forms\ComboBox.ComboBoxChildListUiaProviderTests.cs (10)
13
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
28
ComboBoxStyle
comboBoxStyle,
46
AccessibleObject expectedItem = comboBoxStyle ==
ComboBoxStyle
.Simple
57
ComboBoxStyle
comboBoxStyle,
75
AccessibleObject expectedItem = comboBoxStyle ==
ComboBoxStyle
.DropDownList
85
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
93
public void ChildListAccessibleObject_BoundingRectangle_ReturnsCorrectWidth_IfComboBoxIsScrollable(
ComboBoxStyle
comboBoxStyle)
105
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
System\Windows\Forms\ComboBox.ComboBoxChildNativeWindowTests.cs (1)
11
using ComboBox comboBox = new() { DropDownStyle =
ComboBoxStyle
.DropDown };
System\Windows\Forms\ComboBox.ComboBoxChildTextUiaProviderTests.cs (2)
29
DropDownStyle =
ComboBoxStyle
.DropDownList
54
DropDownStyle =
ComboBoxStyle
.DropDownList
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (194)
14
[InlineData(
ComboBoxStyle
.DropDown)]
15
[InlineData(
ComboBoxStyle
.Simple)]
16
public void ComboBoxUiaTextProvider_Ctor_DoesNotCreateControlHandle(
ComboBoxStyle
dropDownStyle)
39
[InlineData(
ComboBoxStyle
.DropDown)]
40
[InlineData(
ComboBoxStyle
.Simple)]
41
public void ComboBoxUiaTextProvider_IsMultiline_IsFalse(
ComboBoxStyle
dropDownStyle)
55
[InlineData(
ComboBoxStyle
.DropDown)]
56
[InlineData(
ComboBoxStyle
.Simple)]
57
public void ComboBoxUiaTextProvider_IsReadOnly_IsFalse(
ComboBoxStyle
dropDownStyle)
71
[InlineData(
ComboBoxStyle
.DropDown)]
72
[InlineData(
ComboBoxStyle
.Simple)]
73
public void ComboBoxUiaTextProvider_IsScrollable_IsTrue(
ComboBoxStyle
dropDownStyle)
85
[InlineData(
ComboBoxStyle
.DropDown)]
86
[InlineData(
ComboBoxStyle
.Simple)]
87
public void ComboBoxUiaTextProvider_IsScrollable_False_WithoutHandle(
ComboBoxStyle
dropDownStyle)
101
[InlineData(
ComboBoxStyle
.DropDown)]
102
[InlineData(
ComboBoxStyle
.Simple)]
103
public void ComboBoxUiaTextProvider_GetWindowStyle_ReturnsNoneForNotInitializedControl(
ComboBoxStyle
dropDownStyle)
117
[InlineData(
ComboBoxStyle
.DropDown, RightToLeft.Yes, true)]
118
[InlineData(
ComboBoxStyle
.DropDown, RightToLeft.No, false)]
119
[InlineData(
ComboBoxStyle
.Simple, RightToLeft.Yes, true)]
120
[InlineData(
ComboBoxStyle
.Simple, RightToLeft.No, false)]
121
public void ComboBoxUiaTextProvider_IsReadingRTL_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, RightToLeft rightToLeft, bool expectedResult)
133
[InlineData(
ComboBoxStyle
.DropDown, RightToLeft.Yes)]
134
[InlineData(
ComboBoxStyle
.DropDown, RightToLeft.No)]
135
[InlineData(
ComboBoxStyle
.Simple, RightToLeft.Yes)]
136
[InlineData(
ComboBoxStyle
.Simple, RightToLeft.No)]
137
public void ComboBoxUiaTextProvider_IsReadingRTL_ReturnsFalse_WithoutHandle(
ComboBoxStyle
dropDownStyle, RightToLeft rightToLeft)
151
[InlineData(
ComboBoxStyle
.DropDown)]
152
[InlineData(
ComboBoxStyle
.Simple)]
153
public void ComboBoxUiaTextProvider_DocumentRange_IsNotNull_WorksCorrectly(
ComboBoxStyle
dropDownStyle)
171
[InlineData(
ComboBoxStyle
.DropDown)]
172
[InlineData(
ComboBoxStyle
.Simple)]
173
public void ComboBoxUiaTextProvider_DocumentRange_IsNull_ThrowException(
ComboBoxStyle
dropDownStyle)
184
[InlineData(
ComboBoxStyle
.DropDown)]
185
[InlineData(
ComboBoxStyle
.Simple)]
186
public void ComboBoxUiaTextProvider_SupportedTextSelection_IsNotNull(
ComboBoxStyle
dropDownStyle)
201
[InlineData(
ComboBoxStyle
.DropDown)]
202
[InlineData(
ComboBoxStyle
.Simple)]
203
public void ComboBoxUiaTextProvider_GetCaretRange_IsNotNull(
ComboBoxStyle
dropDownStyle)
219
[InlineData(
ComboBoxStyle
.DropDown)]
220
[InlineData(
ComboBoxStyle
.Simple)]
221
public void ComboBoxUiaTextProvider_GetCaretRange_IsNull_IfHandleIsNotCreated(
ComboBoxStyle
dropDownStyle)
239
[InlineData(
ComboBoxStyle
.DropDown)]
240
[InlineData(
ComboBoxStyle
.Simple)]
241
public void ComboBoxUiaTextProvider_LinesPerPage_ReturnsMinusOne_WithoutHandle(
ComboBoxStyle
dropDownStyle)
255
[InlineData(
ComboBoxStyle
.DropDown)]
256
[InlineData(
ComboBoxStyle
.Simple)]
257
public void ComboBoxUiaTextProvider_LinesPerPage_ReturnsOne_WithHandle(
ComboBoxStyle
dropDownStyle)
269
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 0)]
270
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 50)]
271
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 100)]
272
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, -5)]
273
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 0)]
274
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 50)]
275
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 100)]
276
[InlineData(
ComboBoxStyle
.Simple, 50, 20, -5)]
278
ComboBoxStyle
dropDownStyle,
297
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 5)]
298
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 5)]
300
ComboBoxStyle
dropDownStyle,
322
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
324
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
340
ComboBoxStyle
dropDownStyle,
361
ComboBoxStyle
dropDownStyle,
382
[InlineData(
ComboBoxStyle
.DropDown)]
383
[InlineData(
ComboBoxStyle
.Simple)]
384
public void ComboBoxUiaTextProvider_GetLogfont_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle)
402
[InlineData(
ComboBoxStyle
.DropDown)]
403
[InlineData(
ComboBoxStyle
.Simple)]
404
public void ComboBoxUiaTextProvider_GetLogfont_ReturnsEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle)
423
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(50, 20), "Some test text for testing", 0, new Point(1, 0) };
424
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(50, 20), "Some test text for testing", 15, new Point(79, 0) };
426
yield return new object[] {
ComboBoxStyle
.Simple, new Size(50, 20), "Some test text for testing", 0, new Point(1, 0) };
427
yield return new object[] {
ComboBoxStyle
.Simple, new Size(50, 20), "Some test text for testing", 15, new Point(79, 0) };
432
public void ComboBoxUiaTextProvider_GetPositionFromChar_ReturnsCorrectValue(
ComboBoxStyle
dropdownStyle, Size size, string text, int charIndex, Point expectedPoint)
450
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(50, 20), "Some test text for testing", 0 };
451
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(50, 20), "Some test text for testing", 15 };
453
yield return new object[] {
ComboBoxStyle
.Simple, new Size(50, 20), "Some test text for testing", 0 };
454
yield return new object[] {
ComboBoxStyle
.Simple, new Size(50, 20), "Some test text for testing", 15 };
459
public void ComboBoxUiaTextProvider_GetPositionFromChar_ReturnsEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle, Size size, string text, int charIndex)
478
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
480
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
498
public void ComboBoxUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, Size size, string text, int charIndex, Point expectedPoint)
516
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
518
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
536
public void ComboBoxUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsMinusOne_WithoutHandle(
ComboBoxStyle
dropDownStyle, Size size, string text, int charIndex)
555
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
557
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
563
int width = comboBoxStyle ==
ComboBoxStyle
.DropDown ? 27 : 44;
565
width = comboBoxStyle ==
ComboBoxStyle
.DropDown ? 227 : 244;
572
public void ComboBoxUiaTextProvider_GetFormattingRectangle_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, Size size, Rectangle expectedRectangle)
586
[InlineData(
ComboBoxStyle
.DropDown)]
587
[InlineData(
ComboBoxStyle
.Simple)]
588
public void ComboBoxUiaTextProvider_GetFormattingRectangle_ReturnsEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle)
605
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
607
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
621
public void ComboBoxUiaTextProvider_Text_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, string text)
639
public void ComboBoxUiaTextProvider_Text_ReturnsEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle, string text)
658
public void ComboBoxUiaTextProvider_TextLength_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, string text)
673
public void ComboBoxUiaTextProvider_TextLength_ReturnsMinusOne_WithoutHandle(
ComboBoxStyle
dropDownStyle, string text)
689
[InlineData(
ComboBoxStyle
.DropDown)]
690
[InlineData(
ComboBoxStyle
.Simple)]
691
public void ComboBoxUiaTextProvider_WindowExStyle_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle)
703
[InlineData(
ComboBoxStyle
.DropDown)]
704
[InlineData(
ComboBoxStyle
.Simple)]
705
public void ComboBoxUiaTextProvider_WindowExStyle_ReturnsLeft_WithoutHandle(
ComboBoxStyle
dropDownStyle)
721
[InlineData(
ComboBoxStyle
.DropDown)]
722
[InlineData(
ComboBoxStyle
.Simple)]
723
public void ComboBoxUiaTextProvider_EditStyle_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle)
739
[InlineData(
ComboBoxStyle
.DropDown)]
740
[InlineData(
ComboBoxStyle
.Simple)]
741
public void ComboBoxUiaTextProvider_EditStyle_ReturnsLeft_WithoutHandle(
ComboBoxStyle
dropDownStyle)
758
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
760
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
767
int expectedEnd = comboBoxStyle ==
ComboBoxStyle
.DropDown ? 2 : 4;
769
expectedEnd = comboBoxStyle ==
ComboBoxStyle
.DropDown ? 4 : 8;
777
public void ComboBoxUiaTextProvider_GetVisibleRangePoints_ForSinglelineComboBox_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, Size size, int expectedStart, int expectedEnd)
800
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
802
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
817
public void ComboBoxUiaTextProvider_GetVisibleRangePoints_ReturnsZeros_WithoutHandle(
ComboBoxStyle
dropDownStyle, Size size)
837
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(0, 0) };
838
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(100, 20) };
839
yield return new object[] {
ComboBoxStyle
.Simple, new Size(0, 0) };
840
yield return new object[] {
ComboBoxStyle
.Simple, new Size(100, 20) };
845
public void ComboBoxUiaTextProvider_GetVisibleRanges_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, Size size)
863
public void ComboBoxUiaTextProvider_GetVisibleRanges_ReturnsNull_WithoutHandle(
ComboBoxStyle
dropDownStyle, Size size)
882
[InlineData(
ComboBoxStyle
.DropDown)]
883
[InlineData(
ComboBoxStyle
.Simple)]
884
public void ComboBoxUiaTextProvider_RangeFromChild_DoesNotThrowAnException(
ComboBoxStyle
dropDownStyle)
902
yield return new object[] {
ComboBoxStyle
.DropDown, Point.Empty };
903
yield return new object[] {
ComboBoxStyle
.DropDown, new Point(10, 10) };
904
yield return new object[] {
ComboBoxStyle
.Simple, Point.Empty };
905
yield return new object[] {
ComboBoxStyle
.Simple, new Point(10, 10) };
910
public void ComboBoxUiaTextProvider_RangeFromPoint_DoesNotThrowAnException(
ComboBoxStyle
dropDownStyle, Point point)
926
public void ComboBoxUiaTextProvider_RangeFromPoint_ReturnsNull_WithoutHandle(
ComboBoxStyle
dropDownStyle, Point point)
943
[InlineData(
ComboBoxStyle
.DropDown, 2, 5)]
944
[InlineData(
ComboBoxStyle
.DropDown, 0, 10)]
945
[InlineData(
ComboBoxStyle
.Simple, 2, 5)]
946
[InlineData(
ComboBoxStyle
.Simple, 0, 10)]
947
public void ComboBoxUiaTextProvider_SetSelection_GetSelection_ReturnCorrectValue(
ComboBoxStyle
dropDownStyle, int start, int end)
972
[InlineData(
ComboBoxStyle
.DropDown, 2, 5)]
973
[InlineData(
ComboBoxStyle
.DropDown, 0, 10)]
974
[InlineData(
ComboBoxStyle
.Simple, 2, 5)]
975
[InlineData(
ComboBoxStyle
.Simple, 0, 10)]
976
public void ComboBoxUiaTextProvider_SetSelection_GetSelection_DontWork_WithoutHandle(
ComboBoxStyle
dropDownStyle, int start, int end)
1002
[InlineData(
ComboBoxStyle
.DropDown, -5, 10)]
1003
[InlineData(
ComboBoxStyle
.DropDown, 5, 100)]
1004
[InlineData(
ComboBoxStyle
.Simple, -5, 10)]
1005
[InlineData(
ComboBoxStyle
.Simple, 5, 100)]
1006
public void ComboBoxUiaTextProvider_SetSelection_DoesNotSelectText_IfIncorrectArguments(
ComboBoxStyle
dropDownStyle, int start, int end)
1035
[InlineData(
ComboBoxStyle
.DropDown, 0)]
1036
[InlineData(
ComboBoxStyle
.DropDown, 2)]
1037
[InlineData(
ComboBoxStyle
.Simple, 0)]
1038
[InlineData(
ComboBoxStyle
.Simple, 2)]
1039
public void ComboBoxUiaTextProvider_LineScroll_ReturnsFalse(
ComboBoxStyle
dropDownStyle, int newLine)
1054
[InlineData(
ComboBoxStyle
.DropDown, 0)]
1055
[InlineData(
ComboBoxStyle
.DropDown, 2)]
1056
[InlineData(
ComboBoxStyle
.Simple, 0)]
1057
[InlineData(
ComboBoxStyle
.Simple, 2)]
1058
public void ComboBoxUiaTextProvider_LineScroll_DoesNotWork_WithoutHandle(
ComboBoxStyle
dropDownStyle, int newLine)
1075
[InlineData(
ComboBoxStyle
.DropDown)]
1076
[InlineData(
ComboBoxStyle
.Simple)]
1077
public void ComboBoxUiaTextProvider_GetLogfont_ReturnSegoe_ByDefault(
ComboBoxStyle
dropDownStyle)
1092
[InlineData(
ComboBoxStyle
.DropDown)]
1093
[InlineData(
ComboBoxStyle
.Simple)]
1094
public void ComboBoxUiaTextProvider_GetLogfont_ReturnEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle)
1107
[InlineData(
ComboBoxStyle
.DropDown)]
1108
[InlineData(
ComboBoxStyle
.Simple)]
1109
public void ComboBoxUiaTextProvider_FirstVisibleLine_DefaultValueCorrect(
ComboBoxStyle
dropDownStyle)
1121
[InlineData(
ComboBoxStyle
.DropDown)]
1122
[InlineData(
ComboBoxStyle
.Simple)]
1123
public void ComboBoxUiaTextProvider_LinesCount_DefaultValueCorrect(
ComboBoxStyle
dropDownStyle)
1135
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 0)]
1136
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 50)]
1137
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 200)]
1138
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, -5)]
1139
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 0)]
1140
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 50)]
1141
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 200)]
1142
[InlineData(
ComboBoxStyle
.Simple, 50, 20, -5)]
1144
ComboBoxStyle
dropDownStyle,
1164
[InlineData(
ComboBoxStyle
.DropDown, 0)]
1165
[InlineData(
ComboBoxStyle
.DropDown, 2)]
1166
[InlineData(
ComboBoxStyle
.Simple, 0)]
1167
[InlineData(
ComboBoxStyle
.Simple, 2)]
1168
public void ComboBoxUiaTextProvider_LineScroll_DefaultValueCorrect(
ComboBoxStyle
dropDownStyle, int newLine)
System\Windows\Forms\ComboBoxTests.cs (36)
71
Assert.Equal(
ComboBoxStyle
.DropDown, control.DropDownStyle);
463
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
465
if (control.DropDownStyle ==
ComboBoxStyle
.DropDownList)
478
control.DropDownStyle =
ComboBoxStyle
.DropDown;
489
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
491
if (control.DropDownStyle ==
ComboBoxStyle
.DropDownList)
822
[EnumData<
ComboBoxStyle
>]
823
public void ComboBox_DropDownStyle_Set_GetReturnsExpected(
ComboBoxStyle
value)
844
yield return new object[] { source, mode,
ComboBoxStyle
.Simple, mode };
845
yield return new object[] { source, mode,
ComboBoxStyle
.DropDown, mode };
846
yield return new object[] { source, mode,
ComboBoxStyle
.DropDownList, source != AutoCompleteSource.ListItems ? AutoCompleteMode.None : mode };
853
public void ComboBox_DropDownStyle_SetWithSourceAndMode_GetReturnsExpected(AutoCompleteSource source, AutoCompleteMode mode,
ComboBoxStyle
value, AutoCompleteMode expectedMode)
900
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
903
control.DropDownStyle =
ComboBoxStyle
.Simple;
907
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
912
[InlineData(
ComboBoxStyle
.Simple, 1)]
913
[InlineData(
ComboBoxStyle
.DropDown, 0)]
914
[InlineData(
ComboBoxStyle
.DropDownList, 1)]
915
public void ComboBox_DropDownStyle_SetWithHandle_GetReturnsExpected(
ComboBoxStyle
value, int expectedCreatedCallCount)
956
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
957
Assert.Equal(
ComboBoxStyle
.DropDownList, control.DropDownStyle);
961
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
962
Assert.Equal(
ComboBoxStyle
.DropDownList, control.DropDownStyle);
966
control.DropDownStyle =
ComboBoxStyle
.Simple;
967
Assert.Equal(
ComboBoxStyle
.Simple, control.DropDownStyle);
972
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
973
Assert.Equal(
ComboBoxStyle
.DropDownList, control.DropDownStyle);
978
[InvalidEnumData<
ComboBoxStyle
>]
979
public void ComboBox_DropDownStyle_SetInvalidValue_ThrowsInvalidEnumArgumentException(
ComboBoxStyle
value)
2151
[InlineData(
ComboBoxStyle
.DropDown)]
2152
[InlineData(
ComboBoxStyle
.DropDownList)]
2153
[InlineData(
ComboBoxStyle
.Simple)]
2154
public void Combobox_SetCustomSize_DoesNotCreateHandle(
ComboBoxStyle
dropDownStyle)
2734
comboBox.DropDownStyle.Should().Be(
ComboBoxStyle
.DropDown);
2736
comboBox.DropDownStyle =
ComboBoxStyle
.Simple;
2740
comboBox.DropDownStyle.Should().Be(
ComboBoxStyle
.Simple);
System\Windows\Forms\ToolStripComboBoxTests.cs (7)
162
[InlineData(
ComboBoxStyle
.Simple)]
163
[InlineData(
ComboBoxStyle
.DropDown)]
164
[InlineData(
ComboBoxStyle
.DropDownList)]
165
public void ToolStripComboBox_DropDownStyle_SetAndGet(
ComboBoxStyle
style)
274
_toolStripComboBox.DropDownStyle.Should().Be(
ComboBoxStyle
.DropDown);
288
_toolStripComboBox.DropDownStyle =
ComboBoxStyle
.DropDownList;
289
_toolStripComboBox.DropDownStyle.Should().Be(
ComboBoxStyle
.DropDownList);
WinFormsControlsTest (12)
ComboBoxes.Designer.cs (9)
67
this.comboBox2.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.DropDownList;
106
this.comboBox4.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.DropDownList;
131
this.comboBox6.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.DropDownList;
156
this.comboBox8.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.DropDownList;
169
this.comboBox9.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.Simple;
182
this.comboBox10.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.Simple;
195
this.comboBox11.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.Simple;
209
this.comboBox12.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.Simple;
229
this.dataBoundComboBox.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.Simple;
ComboBoxesWithScrollBars.Designer.cs (2)
83
this.comboBox2.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.Simple;
95
this.comboBox3.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.DropDownList;
ToolStripTests.Designer.cs (1)
275
this.toolStripComboBox2.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.DropDownList;