Skip to content

Commit 98322e5

Browse files
ricardobossanRicardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box)
andauthored
Add proper working ToolStripMenuItem controls to DropDownItems (#13065)
Add proper working `ToolStripMenuItem` controls to `DropDownItems`. Fixes #12987 - Added strings to `DropDownItems` instead of adding controls. - Add proper working `ToolStripMenuItem` controls to `DropDownItems`. - Interaction with `DemoConsole` fixed `DropDownItems` will be possible. - No - Minimal - Manual - 10.0.100-preview.3.25125.5 Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <[email protected]>
1 parent 882cea2 commit 98322e5

File tree

1 file changed

+6
-2
lines changed
  • src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole

1 file changed

+6
-2
lines changed

src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/MainForm.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ private void CreateDesignSurface(int n)
303303
topMenuItem1.Text = "TopMenuItem1";
304304
ToolStripMenuItem topMenuItem2 = surface.CreateComponent<ToolStripMenuItem>();
305305
topMenuItem2.Text = "TopMenuItem2";
306+
ToolStripMenuItem dropDownItem1 = surface.CreateComponent<ToolStripMenuItem>();
307+
dropDownItem1.Text = "DropDownItem1";
308+
ToolStripMenuItem dropDownItem2 = surface.CreateComponent<ToolStripMenuItem>();
309+
dropDownItem2.Text = "DropDownItem2";
306310
ToolStripMenuItem bottomMenuItem1 = surface.CreateComponent<ToolStripMenuItem>();
307311
bottomMenuItem1.Text = "BottomMenuItem1";
308312
ToolStripMenuItem bottomMenuItem2 = surface.CreateComponent<ToolStripMenuItem>();
@@ -313,8 +317,8 @@ private void CreateDesignSurface(int n)
313317
menuStrip2.Items.Add(bottomMenuItem1);
314318
menuStrip2.Items.Add(bottomMenuItem2);
315319

316-
topMenuItem1.DropDownItems.Add("DropDownItem1");
317-
topMenuItem2.DropDownItems.Add("DropDownItem12");
320+
topMenuItem1.DropDownItems.Add(dropDownItem1);
321+
topMenuItem2.DropDownItems.Add(dropDownItem2);
318322

319323
ToolStripPanel topToolStripPanel = surface.CreateControl<ToolStripPanel>(new(50, 50), new(0, 0));
320324
topToolStripPanel = toolStripContainer.TopToolStripPanel;

0 commit comments

Comments
 (0)