465 references to ComboBoxStyle
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.Designer.cs (1)
177
this.comboBoxTemplates.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.DropDownList;
System.Windows.Forms (61)
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)
948
get => DropDownStyle ==
ComboBoxStyle
.DropDownList ? string.Empty : Text.Substring(SelectionStart, SelectionLength);
951
if (DropDownStyle !=
ComboBoxStyle
.DropDownList)
1039
[DefaultValue(
ComboBoxStyle
.DropDown)]
1042
public
ComboBoxStyle
DropDownStyle
1044
get => Properties.GetValueOrDefault(s_propStyle,
ComboBoxStyle
.DropDown);
1054
if (value ==
ComboBoxStyle
.DropDownList
1064
Properties.AddOrRemoveValue(s_propStyle, value, defaultValue:
ComboBoxStyle
.DropDown);
1106
if (DropDownStyle ==
ComboBoxStyle
.DropDownList && !IsHandleCreated && !string.IsNullOrEmpty(value) && FindStringExact(value) == -1)
1206
return ((_autoCompleteMode != AutoCompleteMode.None) && (DropDownStyle !=
ComboBoxStyle
.DropDownList));
1395
if (DropDownStyle ==
ComboBoxStyle
.Simple && m.HWnd == _childListBox!.Handle)
1414
if (DropDownStyle ==
ComboBoxStyle
.Simple && m.HWnd == _childListBox!.Handle)
1454
if (DropDownStyle ==
ComboBoxStyle
.Simple && m.HWnd == _childListBox!.Handle)
1479
if (DropDownStyle ==
ComboBoxStyle
.Simple && m.HWnd == _childListBox!.Handle)
1928
if (DropDownStyle is
ComboBoxStyle
.DropDown
1929
or
ComboBoxStyle
.DropDownList)
1976
return DropDownStyle ==
ComboBoxStyle
.Simple ? new(_childListBox) : new(this, _dropDownHandle);
1981
return DropDownStyle ==
ComboBoxStyle
.Simple ? _childListBox! : _childDropDown!;
2171
if (DropDownStyle !=
ComboBoxStyle
.DropDownList)
2233
if (DropDownStyle ==
ComboBoxStyle
.DropDownList && SelectedIndex == index)
2283
if (ok && DropDownStyle !=
ComboBoxStyle
.DropDownList)
2289
if (DropDownStyle ==
ComboBoxStyle
.Simple)
2320
if (DropDownStyle ==
ComboBoxStyle
.Simple)
2596
&& (DropDownStyle ==
ComboBoxStyle
.DropDownList || DropDownStyle ==
ComboBoxStyle
.DropDown))
2664
if (DropDownStyle ==
ComboBoxStyle
.Simple)
2744
&& DropDownStyle ==
ComboBoxStyle
.DropDownList)
2803
if (DropDownStyle ==
ComboBoxStyle
.Simple && recreate)
2823
if (DropDownStyle ==
ComboBoxStyle
.Simple && IsHandleCreated)
2882
if (DropDownStyle ==
ComboBoxStyle
.DropDown)
2889
if (DropDownStyle ==
ComboBoxStyle
.DropDownList)
2939
if (DropDownStyle !=
ComboBoxStyle
.DropDownList
2965
&& DropDownStyle ==
ComboBoxStyle
.DropDownList
3171
if (DropDownStyle ==
ComboBoxStyle
.DropDownList)
3174
Debug.Assert(DropDownStyle ==
ComboBoxStyle
.DropDownList);
3262
if ((specified & BoundsSpecified.Height) != BoundsSpecified.None && DropDownStyle ==
ComboBoxStyle
.Simple)
3440
if (DropDownStyle ==
ComboBoxStyle
.DropDown)
3451
if ((DropDownStyle ==
ComboBoxStyle
.Simple) && ParentInternal is not null)
3663
&& DropDownStyle ==
ComboBoxStyle
.DropDownList
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
68
if (comboBox.DropDownStyle ==
ComboBoxStyle
.Simple)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1271
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 (8)
System\Windows\Forms\Design\ComboBoxDesigner.cs (4)
107
ComboBoxStyle
style =
ComboBoxStyle
.Simple;
112
if (style is
ComboBoxStyle
.DropDown or
ComboBoxStyle
.DropDownList)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
433
_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\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
253
_newItemTypes.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)
32
[InlineData(
ComboBoxStyle
.DropDown)]
33
[InlineData(
ComboBoxStyle
.DropDownList)]
34
public void ComboBoxAccessibleObject_ExpandCollapse_Set_CollapsedState_IfControlIsCreated(
ComboBoxStyle
comboBoxStyle)
55
[InlineData(
ComboBoxStyle
.DropDown)]
56
[InlineData(
ComboBoxStyle
.DropDownList)]
57
public void ComboBoxAccessibleObject_ExpandCollapse_Set_CollapsedState_IfControlIsNotCreated(
ComboBoxStyle
comboBoxStyle)
80
[InlineData(
ComboBoxStyle
.DropDown)]
81
[InlineData(
ComboBoxStyle
.DropDownList)]
82
[InlineData(
ComboBoxStyle
.Simple)]
83
public void ComboBoxAccessibleObject_FragmentNavigate_FirstChild_ReturnNull_IfHandleNotCreated(
ComboBoxStyle
comboBoxStyle)
128
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
134
bool childListDisplayed = droppedDown || comboBoxStyle ==
ComboBoxStyle
.Simple;
144
ComboBoxStyle
comboBoxStyle,
169
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
183
public void ComboBoxAccessibleObject_FragmentNavigate_LastChild_ReturnsExpected(
ComboBoxStyle
comboBoxStyle, bool createControl, bool droppedDown)
197
AccessibleObject expectedLastChild = comboBoxStyle ==
ComboBoxStyle
.Simple
207
[InlineData(
ComboBoxStyle
.DropDown)]
208
[InlineData(
ComboBoxStyle
.DropDownList)]
209
[InlineData(
ComboBoxStyle
.Simple)]
210
public void ComboBoxAccessibleObject_FragmentNavigate_LastChild_ReturnNull_IfHandleNotCreated(
ComboBoxStyle
comboBoxStyle)
329
using ComboBox comboBox = new() { DropDownStyle =
ComboBoxStyle
.Simple };
338
yield return new object[] {
ComboBoxStyle
.DropDown, false, SR.AccessibleActionExpand };
339
yield return new object[] {
ComboBoxStyle
.DropDown, true, SR.AccessibleActionCollapse };
340
yield return new object[] {
ComboBoxStyle
.DropDownList, false, SR.AccessibleActionExpand };
341
yield return new object[] {
ComboBoxStyle
.DropDownList, true, SR.AccessibleActionCollapse };
346
public void ComboBoxAccessibleObject_DefaultAction_IfHandleIsCreated_ReturnsExpected(
ComboBoxStyle
style, bool droppedDown, string expectedAction)
358
public void ComboBoxAccessibleObject_GetPropertyValue_IfHandleIsCreated_ReturnsExpected(
ComboBoxStyle
style, bool droppedDown, string expectedAction)
384
using ComboBox comboBox = new() { DropDownStyle =
ComboBoxStyle
.Simple };
396
[InlineData(
ComboBoxStyle
.DropDown, false, true)]
397
[InlineData(
ComboBoxStyle
.DropDown, true, false)]
398
[InlineData(
ComboBoxStyle
.DropDownList, false, true)]
399
[InlineData(
ComboBoxStyle
.DropDownList, true, false)]
400
public void ComboBoxAccessibleObject_DoDefaultAction_IfHandleIsCreated_DoesExpected(
ComboBoxStyle
style, bool droppedDown, bool expectedDroppedDown)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (62)
84
[InlineData(
ComboBoxStyle
.DropDown)]
85
[InlineData(
ComboBoxStyle
.DropDownList)]
86
[InlineData(
ComboBoxStyle
.Simple)]
87
public void ComboBoxItemAccessibleObject_SeveralSameItems_FragmentNavigate_NextSibling_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
123
[InlineData(
ComboBoxStyle
.DropDown)]
124
[InlineData(
ComboBoxStyle
.DropDownList)]
125
[InlineData(
ComboBoxStyle
.Simple)]
126
public void ComboBoxItemAccessibleObject_SeveralSameItems_FragmentNavigate_PreviousSibling_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
168
[InlineData(
ComboBoxStyle
.DropDown)]
169
[InlineData(
ComboBoxStyle
.DropDownList)]
170
[InlineData(
ComboBoxStyle
.Simple)]
171
public void ComboBoxItemAccessibleObject_FragmentNavigate_Parent_ReturnListAccessibleObject(
ComboBoxStyle
comboBoxStyle)
181
[InlineData(
ComboBoxStyle
.DropDown)]
182
[InlineData(
ComboBoxStyle
.DropDownList)]
183
[InlineData(
ComboBoxStyle
.Simple)]
184
public void ComboBoxItemAccessibleObject_FragmentNavigate_Child_ReturnNull(
ComboBoxStyle
comboBoxStyle)
236
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
244
public void ComboBoxItemAccessibleObject_ScrollIntoView_DoNothing_IfControlIsNotEnabled(
ComboBoxStyle
comboBoxStyle)
253
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
279
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
293
public void ComboBoxItemAccessibleObject_ScrollIntoView_EnsureVisible(
ComboBoxStyle
comboBoxStyle, bool scrollingDown, int itemIndex, int itemsCount)
305
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
367
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
373
int initialYPosition = comboBoxStyle ==
ComboBoxStyle
.Simple ? 56 : 55;
374
int x = comboBoxStyle ==
ComboBoxStyle
.Simple ? 10 : 9;
384
public void ComboBoxItemAccessibleObject_Bounds_ReturnsCorrect_IfComboBoxIsScrollable(
ComboBoxStyle
comboBoxStyle, int itemIndex, Point expectedPosition)
392
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
412
int itemWidth = comboBoxStyle ==
ComboBoxStyle
.Simple ? 79 : 81;
422
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
431
int width = comboBoxStyle ==
ComboBoxStyle
.Simple ? 96 : 81;
432
int x = comboBoxStyle ==
ComboBoxStyle
.Simple ? 10 : 9;
433
int y = comboBoxStyle ==
ComboBoxStyle
.Simple ? 57 : 56;
447
public void ComboBoxItemAccessibleObject_Bounds_ReturnsCorrect_ForDifferentHeightItems(
ComboBoxStyle
comboBoxStyle, int itemIndex, Rectangle expectedRect)
454
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
510
[InlineData(
ComboBoxStyle
.DropDownList)]
511
[InlineData(
ComboBoxStyle
.DropDown)]
512
public void ComboBoxItemAccessibleObject_MaxDropDownItems_State_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
529
[InlineData(
ComboBoxStyle
.DropDownList)]
530
[InlineData(
ComboBoxStyle
.DropDown)]
531
public void ComboBoxItemAccessibleObject_DropDownHeight_State_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
548
[InlineData(
ComboBoxStyle
.DropDownList)]
549
[InlineData(
ComboBoxStyle
.DropDown)]
550
public void ComboBoxItemAccessibleObject_DropDownCollapsed_State_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
566
using ComboBox comboBox = GetComboBoxWithMaxSize(
ComboBoxStyle
.Simple);
583
[InlineData(
ComboBoxStyle
.DropDownList)]
584
[InlineData(
ComboBoxStyle
.DropDown)]
585
public void ComboBoxItemAccessibleObject_MaxDropDownItems_GetOffScreenProperty_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
602
[InlineData(
ComboBoxStyle
.DropDownList)]
603
[InlineData(
ComboBoxStyle
.DropDown)]
604
public void ComboBoxItemAccessibleObject_DropDownHeight_GetOffScreenProperty_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
621
[InlineData(
ComboBoxStyle
.DropDownList)]
622
[InlineData(
ComboBoxStyle
.DropDown)]
623
public void ComboBoxItemAccessibleObject_DropDownCollapsed_GetOffScreenProperty_ReturnExpected(
ComboBoxStyle
comboBoxStyle)
639
using ComboBox comboBox = GetComboBoxWithMaxSize(
ComboBoxStyle
.Simple);
653
private ComboBox GetComboBox(
ComboBoxStyle
comboBoxStyle)
667
private ComboBox GetComboBoxWithMaxItems(
ComboBoxStyle
comboBoxStyle)
677
private ComboBox GetComboBoxWithMaxHeight(
ComboBoxStyle
comboBoxStyle)
686
private ComboBox GetComboBoxWithMaxSize(
ComboBoxStyle
comboBoxStyle)
System\Windows\Forms\Application.ParkingWindowTests.cs (2)
44
DropDownStyle =
ComboBoxStyle
.DropDown
54
comboBox.DropDownStyle =
ComboBoxStyle
.DropDownList;
System\Windows\Forms\ComboBox.ComboBoxChildDropDownButtonUiaProviderTests.cs (13)
14
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
17
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
35
ComboBoxStyle
comboBoxStyle,
60
ComboBoxStyle
comboBoxStyle,
78
AccessibleObject expectedItem = comboBoxStyle ==
ComboBoxStyle
.DropDownList
87
[InlineData(
ComboBoxStyle
.Simple)]
88
[InlineData(
ComboBoxStyle
.DropDownList)]
89
[InlineData(
ComboBoxStyle
.DropDown)]
91
ComboBoxStyle
comboBoxStyle)
106
[InlineData(
ComboBoxStyle
.DropDownList)]
107
[InlineData(
ComboBoxStyle
.DropDown)]
108
public void DropDownButtonUiaProvider_Name_ReturnsExpected(
ComboBoxStyle
comboBoxStyle)
System\Windows\Forms\ComboBox.ComboBoxChildEditUiaProviderTests.cs (19)
15
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
18
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
27
bool childListDisplayed = droppedDown || comboBoxStyle ==
ComboBoxStyle
.Simple;
37
ComboBoxStyle
comboBoxStyle,
63
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
66
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
84
ComboBoxStyle
comboBoxStyle,
102
AccessibleObject expectedItem = comboBoxStyle !=
ComboBoxStyle
.Simple
111
[InlineData(
ComboBoxStyle
.DropDown)]
112
[InlineData(
ComboBoxStyle
.Simple)]
113
public void ComboBoxChildEditUiaProvider_SupportsTextPattern(
ComboBoxStyle
comboBoxStyle)
127
[InlineData(
ComboBoxStyle
.DropDown)]
128
[InlineData(
ComboBoxStyle
.Simple)]
129
public void ComboBoxChildEditUiaProvider_SupportsTextPattern2(
ComboBoxStyle
comboBoxStyle)
143
[InlineData(
ComboBoxStyle
.DropDown)]
144
[InlineData(
ComboBoxStyle
.Simple)]
145
public void ComboBoxChildEditUiaProvider_SupportsValuePattern(
ComboBoxStyle
comboBoxStyle)
System\Windows\Forms\ComboBox.ComboBoxChildListUiaProviderTests.cs (10)
15
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
30
ComboBoxStyle
comboBoxStyle,
48
AccessibleObject expectedItem = comboBoxStyle ==
ComboBoxStyle
.Simple
59
ComboBoxStyle
comboBoxStyle,
77
AccessibleObject expectedItem = comboBoxStyle ==
ComboBoxStyle
.DropDownList
87
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
95
public void ChildListAccessibleObject_BoundingRectangle_ReturnsCorrectWidth_IfComboBoxIsScrollable(
ComboBoxStyle
comboBoxStyle)
107
if (comboBoxStyle ==
ComboBoxStyle
.Simple)
System\Windows\Forms\ComboBox.ComboBoxChildNativeWindowTests.cs (1)
13
using ComboBox comboBox = new() { DropDownStyle =
ComboBoxStyle
.DropDown };
System\Windows\Forms\ComboBox.ComboBoxChildTextUiaProviderTests.cs (2)
31
DropDownStyle =
ComboBoxStyle
.DropDownList
56
DropDownStyle =
ComboBoxStyle
.DropDownList
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (194)
16
[InlineData(
ComboBoxStyle
.DropDown)]
17
[InlineData(
ComboBoxStyle
.Simple)]
18
public void ComboBoxUiaTextProvider_Ctor_DoesNotCreateControlHandle(
ComboBoxStyle
dropDownStyle)
41
[InlineData(
ComboBoxStyle
.DropDown)]
42
[InlineData(
ComboBoxStyle
.Simple)]
43
public void ComboBoxUiaTextProvider_IsMultiline_IsFalse(
ComboBoxStyle
dropDownStyle)
57
[InlineData(
ComboBoxStyle
.DropDown)]
58
[InlineData(
ComboBoxStyle
.Simple)]
59
public void ComboBoxUiaTextProvider_IsReadOnly_IsFalse(
ComboBoxStyle
dropDownStyle)
73
[InlineData(
ComboBoxStyle
.DropDown)]
74
[InlineData(
ComboBoxStyle
.Simple)]
75
public void ComboBoxUiaTextProvider_IsScrollable_IsTrue(
ComboBoxStyle
dropDownStyle)
87
[InlineData(
ComboBoxStyle
.DropDown)]
88
[InlineData(
ComboBoxStyle
.Simple)]
89
public void ComboBoxUiaTextProvider_IsScrollable_False_WithoutHandle(
ComboBoxStyle
dropDownStyle)
103
[InlineData(
ComboBoxStyle
.DropDown)]
104
[InlineData(
ComboBoxStyle
.Simple)]
105
public void ComboBoxUiaTextProvider_GetWindowStyle_ReturnsNoneForNotInitializedControl(
ComboBoxStyle
dropDownStyle)
119
[InlineData(
ComboBoxStyle
.DropDown, RightToLeft.Yes, true)]
120
[InlineData(
ComboBoxStyle
.DropDown, RightToLeft.No, false)]
121
[InlineData(
ComboBoxStyle
.Simple, RightToLeft.Yes, true)]
122
[InlineData(
ComboBoxStyle
.Simple, RightToLeft.No, false)]
123
public void ComboBoxUiaTextProvider_IsReadingRTL_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, RightToLeft rightToLeft, bool expectedResult)
135
[InlineData(
ComboBoxStyle
.DropDown, RightToLeft.Yes)]
136
[InlineData(
ComboBoxStyle
.DropDown, RightToLeft.No)]
137
[InlineData(
ComboBoxStyle
.Simple, RightToLeft.Yes)]
138
[InlineData(
ComboBoxStyle
.Simple, RightToLeft.No)]
139
public void ComboBoxUiaTextProvider_IsReadingRTL_ReturnsFalse_WithoutHandle(
ComboBoxStyle
dropDownStyle, RightToLeft rightToLeft)
153
[InlineData(
ComboBoxStyle
.DropDown)]
154
[InlineData(
ComboBoxStyle
.Simple)]
155
public void ComboBoxUiaTextProvider_DocumentRange_IsNotNull_WorksCorrectly(
ComboBoxStyle
dropDownStyle)
173
[InlineData(
ComboBoxStyle
.DropDown)]
174
[InlineData(
ComboBoxStyle
.Simple)]
175
public void ComboBoxUiaTextProvider_DocumentRange_IsNull_ThrowException(
ComboBoxStyle
dropDownStyle)
186
[InlineData(
ComboBoxStyle
.DropDown)]
187
[InlineData(
ComboBoxStyle
.Simple)]
188
public void ComboBoxUiaTextProvider_SupportedTextSelection_IsNotNull(
ComboBoxStyle
dropDownStyle)
203
[InlineData(
ComboBoxStyle
.DropDown)]
204
[InlineData(
ComboBoxStyle
.Simple)]
205
public void ComboBoxUiaTextProvider_GetCaretRange_IsNotNull(
ComboBoxStyle
dropDownStyle)
221
[InlineData(
ComboBoxStyle
.DropDown)]
222
[InlineData(
ComboBoxStyle
.Simple)]
223
public void ComboBoxUiaTextProvider_GetCaretRange_IsNull_IfHandleIsNotCreated(
ComboBoxStyle
dropDownStyle)
241
[InlineData(
ComboBoxStyle
.DropDown)]
242
[InlineData(
ComboBoxStyle
.Simple)]
243
public void ComboBoxUiaTextProvider_LinesPerPage_ReturnsMinusOne_WithoutHandle(
ComboBoxStyle
dropDownStyle)
257
[InlineData(
ComboBoxStyle
.DropDown)]
258
[InlineData(
ComboBoxStyle
.Simple)]
259
public void ComboBoxUiaTextProvider_LinesPerPage_ReturnsOne_WithHandle(
ComboBoxStyle
dropDownStyle)
271
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 0)]
272
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 50)]
273
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 100)]
274
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, -5)]
275
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 0)]
276
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 50)]
277
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 100)]
278
[InlineData(
ComboBoxStyle
.Simple, 50, 20, -5)]
280
ComboBoxStyle
dropDownStyle,
299
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 5)]
300
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 5)]
302
ComboBoxStyle
dropDownStyle,
324
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
326
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
342
ComboBoxStyle
dropDownStyle,
363
ComboBoxStyle
dropDownStyle,
384
[InlineData(
ComboBoxStyle
.DropDown)]
385
[InlineData(
ComboBoxStyle
.Simple)]
386
public void ComboBoxUiaTextProvider_GetLogfont_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle)
404
[InlineData(
ComboBoxStyle
.DropDown)]
405
[InlineData(
ComboBoxStyle
.Simple)]
406
public void ComboBoxUiaTextProvider_GetLogfont_ReturnsEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle)
425
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(50, 20), "Some test text for testing", 0, new Point(1, 0) };
426
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(50, 20), "Some test text for testing", 15, new Point(79, 0) };
428
yield return new object[] {
ComboBoxStyle
.Simple, new Size(50, 20), "Some test text for testing", 0, new Point(1, 0) };
429
yield return new object[] {
ComboBoxStyle
.Simple, new Size(50, 20), "Some test text for testing", 15, new Point(79, 0) };
434
public void ComboBoxUiaTextProvider_GetPositionFromChar_ReturnsCorrectValue(
ComboBoxStyle
dropdownStyle, Size size, string text, int charIndex, Point expectedPoint)
452
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(50, 20), "Some test text for testing", 0 };
453
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(50, 20), "Some test text for testing", 15 };
455
yield return new object[] {
ComboBoxStyle
.Simple, new Size(50, 20), "Some test text for testing", 0 };
456
yield return new object[] {
ComboBoxStyle
.Simple, new Size(50, 20), "Some test text for testing", 15 };
461
public void ComboBoxUiaTextProvider_GetPositionFromChar_ReturnsEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle, Size size, string text, int charIndex)
480
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
482
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
500
public void ComboBoxUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, Size size, string text, int charIndex, Point expectedPoint)
518
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
520
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
538
public void ComboBoxUiaTextProvider_GetPositionFromCharForUpperRightCorner_ReturnsMinusOne_WithoutHandle(
ComboBoxStyle
dropDownStyle, Size size, string text, int charIndex)
557
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
559
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
565
int width = comboBoxStyle ==
ComboBoxStyle
.DropDown ? 27 : 44;
567
width = comboBoxStyle ==
ComboBoxStyle
.DropDown ? 227 : 244;
574
public void ComboBoxUiaTextProvider_GetFormattingRectangle_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, Size size, Rectangle expectedRectangle)
588
[InlineData(
ComboBoxStyle
.DropDown)]
589
[InlineData(
ComboBoxStyle
.Simple)]
590
public void ComboBoxUiaTextProvider_GetFormattingRectangle_ReturnsEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle)
607
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
609
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
623
public void ComboBoxUiaTextProvider_Text_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, string text)
641
public void ComboBoxUiaTextProvider_Text_ReturnsEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle, string text)
660
public void ComboBoxUiaTextProvider_TextLength_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, string text)
675
public void ComboBoxUiaTextProvider_TextLength_ReturnsMinusOne_WithoutHandle(
ComboBoxStyle
dropDownStyle, string text)
691
[InlineData(
ComboBoxStyle
.DropDown)]
692
[InlineData(
ComboBoxStyle
.Simple)]
693
public void ComboBoxUiaTextProvider_WindowExStyle_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle)
705
[InlineData(
ComboBoxStyle
.DropDown)]
706
[InlineData(
ComboBoxStyle
.Simple)]
707
public void ComboBoxUiaTextProvider_WindowExStyle_ReturnsLeft_WithoutHandle(
ComboBoxStyle
dropDownStyle)
723
[InlineData(
ComboBoxStyle
.DropDown)]
724
[InlineData(
ComboBoxStyle
.Simple)]
725
public void ComboBoxUiaTextProvider_EditStyle_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle)
741
[InlineData(
ComboBoxStyle
.DropDown)]
742
[InlineData(
ComboBoxStyle
.Simple)]
743
public void ComboBoxUiaTextProvider_EditStyle_ReturnsLeft_WithoutHandle(
ComboBoxStyle
dropDownStyle)
760
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
762
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
769
int expectedEnd = comboBoxStyle ==
ComboBoxStyle
.DropDown ? 2 : 4;
771
expectedEnd = comboBoxStyle ==
ComboBoxStyle
.DropDown ? 4 : 8;
779
public void ComboBoxUiaTextProvider_GetVisibleRangePoints_ForSinglelineComboBox_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, Size size, int expectedStart, int expectedEnd)
802
foreach (
ComboBoxStyle
comboBoxStyle in Enum.GetValues(typeof(
ComboBoxStyle
)))
804
if (comboBoxStyle ==
ComboBoxStyle
.DropDownList)
819
public void ComboBoxUiaTextProvider_GetVisibleRangePoints_ReturnsZeros_WithoutHandle(
ComboBoxStyle
dropDownStyle, Size size)
839
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(0, 0) };
840
yield return new object[] {
ComboBoxStyle
.DropDown, new Size(100, 20) };
841
yield return new object[] {
ComboBoxStyle
.Simple, new Size(0, 0) };
842
yield return new object[] {
ComboBoxStyle
.Simple, new Size(100, 20) };
847
public void ComboBoxUiaTextProvider_GetVisibleRanges_ReturnsCorrectValue(
ComboBoxStyle
dropDownStyle, Size size)
865
public void ComboBoxUiaTextProvider_GetVisibleRanges_ReturnsNull_WithoutHandle(
ComboBoxStyle
dropDownStyle, Size size)
884
[InlineData(
ComboBoxStyle
.DropDown)]
885
[InlineData(
ComboBoxStyle
.Simple)]
886
public void ComboBoxUiaTextProvider_RangeFromChild_DoesNotThrowAnException(
ComboBoxStyle
dropDownStyle)
904
yield return new object[] {
ComboBoxStyle
.DropDown, Point.Empty };
905
yield return new object[] {
ComboBoxStyle
.DropDown, new Point(10, 10) };
906
yield return new object[] {
ComboBoxStyle
.Simple, Point.Empty };
907
yield return new object[] {
ComboBoxStyle
.Simple, new Point(10, 10) };
912
public void ComboBoxUiaTextProvider_RangeFromPoint_DoesNotThrowAnException(
ComboBoxStyle
dropDownStyle, Point point)
928
public void ComboBoxUiaTextProvider_RangeFromPoint_ReturnsNull_WithoutHandle(
ComboBoxStyle
dropDownStyle, Point point)
945
[InlineData(
ComboBoxStyle
.DropDown, 2, 5)]
946
[InlineData(
ComboBoxStyle
.DropDown, 0, 10)]
947
[InlineData(
ComboBoxStyle
.Simple, 2, 5)]
948
[InlineData(
ComboBoxStyle
.Simple, 0, 10)]
949
public void ComboBoxUiaTextProvider_SetSelection_GetSelection_ReturnCorrectValue(
ComboBoxStyle
dropDownStyle, int start, int end)
974
[InlineData(
ComboBoxStyle
.DropDown, 2, 5)]
975
[InlineData(
ComboBoxStyle
.DropDown, 0, 10)]
976
[InlineData(
ComboBoxStyle
.Simple, 2, 5)]
977
[InlineData(
ComboBoxStyle
.Simple, 0, 10)]
978
public void ComboBoxUiaTextProvider_SetSelection_GetSelection_DontWork_WithoutHandle(
ComboBoxStyle
dropDownStyle, int start, int end)
1004
[InlineData(
ComboBoxStyle
.DropDown, -5, 10)]
1005
[InlineData(
ComboBoxStyle
.DropDown, 5, 100)]
1006
[InlineData(
ComboBoxStyle
.Simple, -5, 10)]
1007
[InlineData(
ComboBoxStyle
.Simple, 5, 100)]
1008
public void ComboBoxUiaTextProvider_SetSelection_DoesNotSelectText_IfIncorrectArguments(
ComboBoxStyle
dropDownStyle, int start, int end)
1037
[InlineData(
ComboBoxStyle
.DropDown, 0)]
1038
[InlineData(
ComboBoxStyle
.DropDown, 2)]
1039
[InlineData(
ComboBoxStyle
.Simple, 0)]
1040
[InlineData(
ComboBoxStyle
.Simple, 2)]
1041
public void ComboBoxUiaTextProvider_LineScroll_ReturnsFalse(
ComboBoxStyle
dropDownStyle, int newLine)
1056
[InlineData(
ComboBoxStyle
.DropDown, 0)]
1057
[InlineData(
ComboBoxStyle
.DropDown, 2)]
1058
[InlineData(
ComboBoxStyle
.Simple, 0)]
1059
[InlineData(
ComboBoxStyle
.Simple, 2)]
1060
public void ComboBoxUiaTextProvider_LineScroll_DoesNotWork_WithoutHandle(
ComboBoxStyle
dropDownStyle, int newLine)
1077
[InlineData(
ComboBoxStyle
.DropDown)]
1078
[InlineData(
ComboBoxStyle
.Simple)]
1079
public void ComboBoxUiaTextProvider_GetLogfont_ReturnSegoe_ByDefault(
ComboBoxStyle
dropDownStyle)
1094
[InlineData(
ComboBoxStyle
.DropDown)]
1095
[InlineData(
ComboBoxStyle
.Simple)]
1096
public void ComboBoxUiaTextProvider_GetLogfont_ReturnEmpty_WithoutHandle(
ComboBoxStyle
dropDownStyle)
1109
[InlineData(
ComboBoxStyle
.DropDown)]
1110
[InlineData(
ComboBoxStyle
.Simple)]
1111
public void ComboBoxUiaTextProvider_FirstVisibleLine_DefaultValueCorrect(
ComboBoxStyle
dropDownStyle)
1123
[InlineData(
ComboBoxStyle
.DropDown)]
1124
[InlineData(
ComboBoxStyle
.Simple)]
1125
public void ComboBoxUiaTextProvider_LinesCount_DefaultValueCorrect(
ComboBoxStyle
dropDownStyle)
1137
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 0)]
1138
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 50)]
1139
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, 200)]
1140
[InlineData(
ComboBoxStyle
.DropDown, 50, 20, -5)]
1141
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 0)]
1142
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 50)]
1143
[InlineData(
ComboBoxStyle
.Simple, 50, 20, 200)]
1144
[InlineData(
ComboBoxStyle
.Simple, 50, 20, -5)]
1146
ComboBoxStyle
dropDownStyle,
1166
[InlineData(
ComboBoxStyle
.DropDown, 0)]
1167
[InlineData(
ComboBoxStyle
.DropDown, 2)]
1168
[InlineData(
ComboBoxStyle
.Simple, 0)]
1169
[InlineData(
ComboBoxStyle
.Simple, 2)]
1170
public void ComboBoxUiaTextProvider_LineScroll_DefaultValueCorrect(
ComboBoxStyle
dropDownStyle, int newLine)
System\Windows\Forms\ComboBoxTests.cs (36)
73
Assert.Equal(
ComboBoxStyle
.DropDown, control.DropDownStyle);
464
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
466
if (control.DropDownStyle ==
ComboBoxStyle
.DropDownList)
479
control.DropDownStyle =
ComboBoxStyle
.DropDown;
490
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
492
if (control.DropDownStyle ==
ComboBoxStyle
.DropDownList)
823
[EnumData<
ComboBoxStyle
>]
824
public void ComboBox_DropDownStyle_Set_GetReturnsExpected(
ComboBoxStyle
value)
845
yield return new object[] { source, mode,
ComboBoxStyle
.Simple, mode };
846
yield return new object[] { source, mode,
ComboBoxStyle
.DropDown, mode };
847
yield return new object[] { source, mode,
ComboBoxStyle
.DropDownList, source != AutoCompleteSource.ListItems ? AutoCompleteMode.None : mode };
854
public void ComboBox_DropDownStyle_SetWithSourceAndMode_GetReturnsExpected(AutoCompleteSource source, AutoCompleteMode mode,
ComboBoxStyle
value, AutoCompleteMode expectedMode)
901
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
904
control.DropDownStyle =
ComboBoxStyle
.Simple;
908
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
913
[InlineData(
ComboBoxStyle
.Simple, 1)]
914
[InlineData(
ComboBoxStyle
.DropDown, 0)]
915
[InlineData(
ComboBoxStyle
.DropDownList, 1)]
916
public void ComboBox_DropDownStyle_SetWithHandle_GetReturnsExpected(
ComboBoxStyle
value, int expectedCreatedCallCount)
957
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
958
Assert.Equal(
ComboBoxStyle
.DropDownList, control.DropDownStyle);
962
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
963
Assert.Equal(
ComboBoxStyle
.DropDownList, control.DropDownStyle);
967
control.DropDownStyle =
ComboBoxStyle
.Simple;
968
Assert.Equal(
ComboBoxStyle
.Simple, control.DropDownStyle);
973
control.DropDownStyle =
ComboBoxStyle
.DropDownList;
974
Assert.Equal(
ComboBoxStyle
.DropDownList, control.DropDownStyle);
979
[InvalidEnumData<
ComboBoxStyle
>]
980
public void ComboBox_DropDownStyle_SetInvalidValue_ThrowsInvalidEnumArgumentException(
ComboBoxStyle
value)
2152
[InlineData(
ComboBoxStyle
.DropDown)]
2153
[InlineData(
ComboBoxStyle
.DropDownList)]
2154
[InlineData(
ComboBoxStyle
.Simple)]
2155
public void Combobox_SetCustomSize_DoesNotCreateHandle(
ComboBoxStyle
dropDownStyle)
2735
comboBox.DropDownStyle.Should().Be(
ComboBoxStyle
.DropDown);
2737
comboBox.DropDownStyle =
ComboBoxStyle
.Simple;
2741
comboBox.DropDownStyle.Should().Be(
ComboBoxStyle
.Simple);
System\Windows\Forms\ToolStripComboBoxTests.cs (7)
160
[InlineData(
ComboBoxStyle
.Simple)]
161
[InlineData(
ComboBoxStyle
.DropDown)]
162
[InlineData(
ComboBoxStyle
.DropDownList)]
163
public void ToolStripComboBox_DropDownStyle_SetAndGet(
ComboBoxStyle
style)
272
_toolStripComboBox.DropDownStyle.Should().Be(
ComboBoxStyle
.DropDown);
286
_toolStripComboBox.DropDownStyle =
ComboBoxStyle
.DropDownList;
287
_toolStripComboBox.DropDownStyle.Should().Be(
ComboBoxStyle
.DropDownList);
TestPassApp (1)
CommonControl1.Designer.cs (1)
318
this.comboBox2.DropDownStyle = System.Windows.Forms.
ComboBoxStyle
.Simple;
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;