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