1 write to _toolStripComboBox
System.Windows.Forms.Tests (1)
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
16
_toolStripComboBox
= new();
125 references to _toolStripComboBox
System.Windows.Forms.Tests (125)
System\Windows\Forms\ToolStripComboBoxTests.cs (125)
21
_toolStripComboBox
.Dispose();
35
_toolStripComboBox
.DropDownHeight.Should().Be(106);
37
_toolStripComboBox
.DropDownHeight = 200;
38
_toolStripComboBox
.DropDownHeight.Should().Be(200);
44
_toolStripComboBox
.DropDownWidth = 200;
45
_toolStripComboBox
.DropDownWidth.Should().Be(200);
51
_toolStripComboBox
.DroppedDown.Should().BeFalse();
53
_toolStripComboBox
.DroppedDown = true;
55
_toolStripComboBox
.DroppedDown = false;
56
_toolStripComboBox
.DroppedDown.Should().BeFalse();
62
_toolStripComboBox
.MaxLength = 10;
63
_toolStripComboBox
.MaxLength.Should().Be(10);
69
_toolStripComboBox
.IntegralHeight.Should().BeTrue();
71
_toolStripComboBox
.IntegralHeight = false;
72
_toolStripComboBox
.IntegralHeight.Should().BeFalse();
74
_toolStripComboBox
.IntegralHeight = true;
75
_toolStripComboBox
.IntegralHeight.Should().BeTrue();
81
_toolStripComboBox
.MaxDropDownItems = 20;
82
_toolStripComboBox
.MaxDropDownItems.Should().Be(20);
88
_toolStripComboBox
.Sorted.Should().BeFalse();
90
_toolStripComboBox
.Sorted = true;
91
_toolStripComboBox
.Sorted.Should().BeTrue();
93
_toolStripComboBox
.Sorted = false;
94
_toolStripComboBox
.Sorted.Should().BeFalse();
108
_toolStripComboBox
.AutoCompleteCustomSource = source;
109
_toolStripComboBox
.AutoCompleteCustomSource.Should().BeEquivalentTo(source);
119
_toolStripComboBox
.AutoCompleteMode.Should().Be(AutoCompleteMode.None);
121
_toolStripComboBox
.AutoCompleteMode = mode;
122
_toolStripComboBox
.AutoCompleteMode.Should().Be(mode);
137
_toolStripComboBox
.AutoCompleteSource = source;
138
_toolStripComboBox
.AutoCompleteSource.Should().Be(source);
145
_toolStripComboBox
.BackgroundImage = image;
146
_toolStripComboBox
.BackgroundImage.Should().Be(image);
157
_toolStripComboBox
.BackgroundImageLayout = layout;
158
_toolStripComboBox
.BackgroundImageLayout.Should().Be(layout);
167
_toolStripComboBox
.DropDownStyle = style;
168
_toolStripComboBox
.DropDownStyle.Should().Be(style);
178
_toolStripComboBox
.FlatStyle = style;
179
_toolStripComboBox
.FlatStyle.Should().Be(style);
186
_toolStripComboBox
.Items.AddRange(items);
187
_toolStripComboBox
.Items.Cast<string>().Should().Contain(items);
193
_toolStripComboBox
.SelectedIndex.Should().Be(-1);
195
_toolStripComboBox
.Items.Add("Item1");
196
_toolStripComboBox
.Items.Add("Item2");
197
_toolStripComboBox
.SelectedIndex = 1;
198
_toolStripComboBox
.SelectedIndex.Should().Be(1);
200
_toolStripComboBox
.SelectedIndex = 0;
201
_toolStripComboBox
.SelectedIndex.Should().Be(0);
207
_toolStripComboBox
.SelectedItem.Should().BeNull();
209
_toolStripComboBox
.Items.Add("Item1");
210
_toolStripComboBox
.Items.Add("Item2");
211
_toolStripComboBox
.SelectedItem = "Item2";
212
_toolStripComboBox
.SelectedItem.Should().Be("Item2");
218
_toolStripComboBox
.SelectionLength.Should().Be(0);
220
_toolStripComboBox
.Items.Add("Item1");
221
_toolStripComboBox
.Items.Add("Item2");
222
_toolStripComboBox
.SelectedIndex = 1;
223
_toolStripComboBox
.SelectionLength = 5;
224
_toolStripComboBox
.SelectionLength.Should().Be(5);
230
_toolStripComboBox
.SelectionStart.Should().Be(0);
232
_toolStripComboBox
.Items.Add("Item1");
233
_toolStripComboBox
.Items.Add("Item2");
234
_toolStripComboBox
.SelectedIndex = 1;
235
_toolStripComboBox
.SelectionStart = 1;
236
_toolStripComboBox
.SelectionStart.Should().Be(1);
245
_toolStripComboBox
.DropDown += handler;
246
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnDropDown(EventArgs.Empty);
250
_toolStripComboBox
.DropDown -= handler;
251
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnDropDown(EventArgs.Empty);
261
_toolStripComboBox
.DropDownClosed += handler;
262
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnDropDownClosed(EventArgs.Empty);
266
_toolStripComboBox
.DropDownClosed -= handler;
267
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnDropDownClosed(EventArgs.Empty);
274
_toolStripComboBox
.DropDownStyle.Should().Be(ComboBoxStyle.DropDown);
279
_toolStripComboBox
.DropDownStyleChanged += handler;
280
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnDropDownStyleChanged(EventArgs.Empty);
284
_toolStripComboBox
.DropDownStyleChanged -= handler;
285
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnDropDownStyleChanged(EventArgs.Empty);
288
_toolStripComboBox
.DropDownStyle = ComboBoxStyle.DropDownList;
289
_toolStripComboBox
.DropDownStyle.Should().Be(ComboBoxStyle.DropDownList);
298
_toolStripComboBox
.SelectedIndexChanged += handler;
299
_toolStripComboBox
.Items.Add("Item1");
300
_toolStripComboBox
.Items.Add("Item2");
301
_toolStripComboBox
.SelectedIndex = 1;
305
_toolStripComboBox
.SelectedIndexChanged -= handler;
306
_toolStripComboBox
.SelectedIndex = 0;
316
_toolStripComboBox
.TextUpdate += handler;
317
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnTextUpdate(EventArgs.Empty);
321
_toolStripComboBox
.TextUpdate -= handler;
322
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnTextUpdate(EventArgs.Empty);
329
_toolStripComboBox
.Items.Add("Item1");
330
_toolStripComboBox
.Items.Add("Item2");
332
_toolStripComboBox
.BeginUpdate();
333
_toolStripComboBox
.EndUpdate();
335
int index =
_toolStripComboBox
.FindString("Item1");
338
index =
_toolStripComboBox
.FindString("Item2", 1);
341
index =
_toolStripComboBox
.FindStringExact("Item1");
344
index =
_toolStripComboBox
.FindStringExact("Item2", 1);
347
int height =
_toolStripComboBox
.GetItemHeight(0);
350
_toolStripComboBox
.ComboBox.Text = "Item1";
351
_toolStripComboBox
.ComboBox.Select(0, 5);
352
_toolStripComboBox
.SelectedText.Should().Be("Item1");
354
_toolStripComboBox
.SelectAll();
355
_toolStripComboBox
.SelectionLength.Should().Be(
_toolStripComboBox
.Text.Length);
364
_toolStripComboBox
.DoubleClick += handler;
365
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnDoubleClick(EventArgs.Empty);
369
_toolStripComboBox
.DoubleClick -= handler;
370
_toolStripComboBox
.ComboBox.TestAccessor().Dynamic.OnDoubleClick(EventArgs.Empty);
377
_toolStripComboBox
.Items.Add("Item1");
378
_toolStripComboBox
.Items.Add("Item2");
379
_toolStripComboBox
.ToString().Should().Be($"{
_toolStripComboBox
.GetType().FullName}, Items.Count: 2");
386
Size preferredSize =
_toolStripComboBox
.GetPreferredSize(constrainingSize);
397
Size preferredSize =
_toolStripComboBox
.GetPreferredSize(constrainingSize);
406
_toolStripComboBox
.SelectedText = string.Empty;
407
_toolStripComboBox
.SelectedText.Should().BeEmpty();
413
_toolStripComboBox
.Items.Add("Item1");
414
_toolStripComboBox
.Items.Add("Item2");
415
_toolStripComboBox
.SelectedIndex = 1;
416
_toolStripComboBox
.SelectionStart = 0;
417
_toolStripComboBox
.SelectionLength = 5;
418
_toolStripComboBox
.SelectedText = "Item2";
420
_toolStripComboBox
.ComboBox.Select(0, 5);
421
_toolStripComboBox
.SelectedText.Should().Be("Item2");