1 write to _propertyGrid
System.Windows.Forms.UI.IntegrationTests (1)
PropertyGridTests.cs (1)
21
_propertyGrid
= new();
150 references to _propertyGrid
System.Windows.Forms.UI.IntegrationTests (150)
PropertyGridTests.cs (150)
22
_form = new() { Controls = {
_propertyGrid
} };
23
_propertyGrid
.CreateControl();
24
_propertyGrid
.SelectedObject = _form;
31
_propertyGrid
.Dispose();
37
_propertyGrid
.Focused.Should().BeFalse();
43
_propertyGrid
.ToolbarVisible.Should().BeTrue();
45
_propertyGrid
.ToolbarVisible = false;
46
_propertyGrid
.ToolbarVisible.Should().BeFalse();
52
_propertyGrid
.HelpVisible.Should().BeTrue();
54
_propertyGrid
.HelpVisible = false;
55
_propertyGrid
.HelpVisible.Should().BeFalse();
61
_propertyGrid
.CommandsVisibleIfAvailable.Should().BeTrue();
63
_propertyGrid
.CommandsVisibleIfAvailable = false;
64
_propertyGrid
.CommandsVisibleIfAvailable.Should().BeFalse();
70
_propertyGrid
.CommandsVisible.Should().BeFalse();
76
_propertyGrid
.CanShowCommands.Should().BeFalse();
82
_propertyGrid
.CanShowVisualStyleGlyphs.Should().BeTrue();
84
_propertyGrid
.CanShowVisualStyleGlyphs = false;
85
_propertyGrid
.CanShowVisualStyleGlyphs.Should().BeFalse();
91
_propertyGrid
.AutoScroll.Should().BeFalse();
93
_propertyGrid
.AutoScroll = true;
94
_propertyGrid
.AutoScroll.Should().BeTrue();
100
Action act =
_propertyGrid
.Refresh;
107
_propertyGrid
.CommandsBorderColor.Should().Be(SystemColors.ControlDark);
109
_propertyGrid
.CommandsBorderColor = Color.Red;
110
_propertyGrid
.CommandsBorderColor.Should().Be(Color.Red);
116
_propertyGrid
.HelpBorderColor.Should().Be(SystemColors.ControlDark);
118
_propertyGrid
.HelpBorderColor = Color.Blue;
119
_propertyGrid
.HelpBorderColor.Should().Be(Color.Blue);
125
_propertyGrid
.SelectedItemWithFocusBackColor.Should().Be(SystemColors.Highlight);
127
_propertyGrid
.SelectedItemWithFocusBackColor = Color.Green;
128
_propertyGrid
.SelectedItemWithFocusBackColor.Should().Be(Color.Green);
134
_propertyGrid
.SelectedItemWithFocusForeColor.Should().Be(SystemColors.HighlightText);
136
_propertyGrid
.SelectedItemWithFocusForeColor = Color.Red;
137
_propertyGrid
.SelectedItemWithFocusForeColor.Should().Be(Color.Red);
143
_propertyGrid
.DisabledItemForeColor.Should().Be(SystemColors.GrayText);
145
_propertyGrid
.DisabledItemForeColor = Color.Blue;
146
_propertyGrid
.DisabledItemForeColor.Should().Be(Color.Blue);
152
_propertyGrid
.CategorySplitterColor.Should().Be(SystemColors.Control);
154
_propertyGrid
.CategorySplitterColor = Color.Green;
155
_propertyGrid
.CategorySplitterColor.Should().Be(Color.Green);
161
_propertyGrid
.ForeColor.Should().Be(SystemColors.ControlText);
163
_propertyGrid
.ForeColor = Color.Red;
164
_propertyGrid
.ForeColor.Should().Be(Color.Red);
170
_propertyGrid
.BackgroundImageLayout.Should().Be(ImageLayout.Tile);
172
_propertyGrid
.BackgroundImageLayout = ImageLayout.Center;
173
_propertyGrid
.BackgroundImageLayout.Should().Be(ImageLayout.Center);
179
_propertyGrid
.BackgroundImage.Should().BeNull();
182
_propertyGrid
.BackgroundImage = newImage;
183
_propertyGrid
.BackgroundImage.Should().Be(newImage);
189
_propertyGrid
.BackColor.Should().Be(SystemColors.Control);
191
_propertyGrid
.BackColor = Color.Blue;
192
_propertyGrid
.BackColor.Should().Be(Color.Blue);
198
_propertyGrid
.BrowsableAttributes[0].Should().Be(BrowsableAttribute.Default);
201
_propertyGrid
.BrowsableAttributes = newAttributes;
202
_propertyGrid
.BrowsableAttributes.Contains(newAttributes[0]).Should().BeTrue();
208
_propertyGrid
.CommandsBackColor.Should().Be(SystemColors.Control);
210
_propertyGrid
.CommandsBackColor = Color.Green;
211
_propertyGrid
.CommandsBackColor.Should().Be(Color.Green);
217
_propertyGrid
.CommandsForeColor.Should().Be(SystemColors.ControlText);
219
_propertyGrid
.CommandsForeColor = Color.Red;
220
_propertyGrid
.CommandsForeColor.Should().Be(Color.Red);
226
_propertyGrid
.ContextMenuDefaultLocation.Should().NotBeNull();
228
Point oldLocation =
_propertyGrid
.ContextMenuDefaultLocation;
231
_propertyGrid
.Location = newLocation;
232
_propertyGrid
.ContextMenuDefaultLocation.X.Should().Be(oldLocation.X + newLocation.X);
233
_propertyGrid
.ContextMenuDefaultLocation.Y.Should().Be(oldLocation.Y + newLocation.Y);
239
_propertyGrid
.Controls.Should().NotBeNull();
242
_propertyGrid
.Controls.Add(textBox);
243
_propertyGrid
.Controls.Contains(textBox).Should().BeTrue();
249
_propertyGrid
.HelpBackColor.Should().Be(SystemColors.Control);
251
_propertyGrid
.HelpBackColor = Color.Blue;
252
_propertyGrid
.HelpBackColor.Should().Be(Color.Blue);
258
_propertyGrid
.HelpForeColor.Should().Be(SystemColors.ControlText);
260
_propertyGrid
.HelpForeColor = Color.Green;
261
_propertyGrid
.HelpForeColor.Should().Be(Color.Green);
267
_propertyGrid
.LineColor.Should().Be(SystemColors.InactiveBorder);
269
_propertyGrid
.LineColor = Color.Red;
270
_propertyGrid
.LineColor.Should().Be(Color.Red);
276
_propertyGrid
.PropertySort.Should().Be(PropertySort.CategorizedAlphabetical);
278
_propertyGrid
.PropertySort = PropertySort.Alphabetical;
279
_propertyGrid
.PropertySort.Should().Be(PropertySort.Alphabetical);
285
_propertyGrid
.SelectedObject.Should().Be(_form);
288
_propertyGrid
.SelectedObject = textBox1;
289
_propertyGrid
.SelectedObject.Should().Be(textBox1);
291
_propertyGrid
.SelectedObject = null;
292
_propertyGrid
.SelectedObject.Should().BeNull();
298
_propertyGrid
.SelectedObjects.Should().Contain(_form);
305
_propertyGrid
.SelectedObjects = objects;
306
_propertyGrid
.SelectedObjects.Should().Contain(objects);
308
_propertyGrid
.SelectedObjects = [];
309
_propertyGrid
.SelectedObjects.Should().BeEmpty();
316
Action act = () =>
_propertyGrid
.SelectedObjects = objects;
323
_propertyGrid
.SelectedTab.Should().NotBeNull();
329
_propertyGrid
.LargeButtons.Should().BeFalse();
331
_propertyGrid
.LargeButtons = true;
332
_propertyGrid
.LargeButtons.Should().BeTrue();
338
_propertyGrid
.ViewBackColor.Should().Be(SystemColors.Window);
340
_propertyGrid
.ViewBackColor = Color.Red;
341
_propertyGrid
.ViewBackColor.Should().Be(Color.Red);
347
_propertyGrid
.ViewBorderColor.Should().Be(SystemColors.ControlDark);
349
_propertyGrid
.ViewBorderColor = Color.Blue;
350
_propertyGrid
.ViewBorderColor.Should().Be(Color.Blue);
356
_propertyGrid
.ViewForeColor.Should().Be(SystemColors.WindowText);
358
_propertyGrid
.ViewForeColor = Color.Green;
359
_propertyGrid
.ViewForeColor.Should().Be(Color.Green);
365
_propertyGrid
.CategoryForeColor.Should().Be(SystemColors.ControlText);
367
_propertyGrid
.CategoryForeColor = SystemColors.MenuHighlight;
368
_propertyGrid
.CategoryForeColor.Should().Be(SystemColors.MenuHighlight);
374
_propertyGrid
.CommandsLinkColor.A.Should().Be(255);
375
_propertyGrid
.CommandsLinkColor.R.Should().Be(0);
376
_propertyGrid
.CommandsLinkColor.G.Should().Be(0);
377
_propertyGrid
.CommandsLinkColor.B.Should().Be(255);
379
_propertyGrid
.CommandsLinkColor = Color.Silver;
380
_propertyGrid
.CommandsLinkColor.Should().Be(Color.Silver);
386
_propertyGrid
.CommandsActiveLinkColor.Should().Be(Color.Red);
388
_propertyGrid
.CommandsActiveLinkColor = SystemColors.ControlDark;
389
_propertyGrid
.CommandsActiveLinkColor.Should().Be(SystemColors.ControlDark);
395
_propertyGrid
.CommandsDisabledLinkColor.A.Should().Be(255);
396
_propertyGrid
.CommandsDisabledLinkColor.R.Should().Be(133);
397
_propertyGrid
.CommandsDisabledLinkColor.G.Should().Be(133);
398
_propertyGrid
.CommandsDisabledLinkColor.B.Should().Be(133);
400
_propertyGrid
.CommandsDisabledLinkColor = Color.Orange;
401
_propertyGrid
.CommandsDisabledLinkColor.Should().Be(Color.Orange);
408
_propertyGrid
.SelectedObject = textBox;
418
_propertyGrid
.ResetSelectedProperty();
425
HScrollProperties horizontalScroll =
_propertyGrid
.HorizontalScroll;
432
VScrollProperties verticalScroll =
_propertyGrid
.VerticalScroll;
439
_propertyGrid
.UseCompatibleTextRendering.Should().BeTrue();
441
_propertyGrid
.UseCompatibleTextRendering = false;
442
_propertyGrid
.UseCompatibleTextRendering.Should().BeFalse();
444
_propertyGrid
.UseCompatibleTextRendering = true;
445
_propertyGrid
.UseCompatibleTextRendering.Should().BeTrue();
451
_propertyGrid
.Site.Should().BeNull();
454
_propertyGrid
.Site = mockSite.Object;
455
_propertyGrid
.Site.Should().Be(mockSite.Object);
461
_propertyGrid
.PropertyTabs.Should().NotBeNull();
463
PropertyTabCollection propertyTabCollection =
_propertyGrid
.PropertyTabs;
465
propertyGrid.Should().Be(
_propertyGrid
);
471
PropertyTabCollection initialTabs =
_propertyGrid
.PropertyTabs;
474
_propertyGrid
.RefreshTabs(PropertyTabScope.Component);
475
PropertyTabCollection refreshedTabs =
_propertyGrid
.PropertyTabs;
488
_propertyGrid
.SelectedGridItem.Should().NotBeNull();
489
_propertyGrid
.SelectedGridItem!.Label.Should().Be("Text");
491
_propertyGrid
.SelectedObject =
_propertyGrid
;
492
_propertyGrid
.SelectedGridItem.Label.Should().Be("Accessibility");
494
GridItem gridItem =
_propertyGrid
.SelectedGridItem.GridItems[0];
495
_propertyGrid
.SelectedGridItem = gridItem;
496
_propertyGrid
.SelectedGridItem.Should().Be(gridItem);