MenuStrip.MdiWindowListItem Property

Gets or sets the ToolStripMenuItem that is used to display a list of Multiple-document interface (MDI) child forms.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

[TypeConverterAttribute(typeof(MdiWindowListItemConverter))] 
public ToolStripMenuItem MdiWindowListItem { get; set; }
/** @property */
public ToolStripMenuItem get_MdiWindowListItem ()

/** @property */
public void set_MdiWindowListItem (ToolStripMenuItem value)

public function get MdiWindowListItem () : ToolStripMenuItem

public function set MdiWindowListItem (value : ToolStripMenuItem)

Not applicable.

Property Value

A ToolStripMenuItem that represents the menu item displaying a list of MDI child forms that are open in the application.

Use the MdiWindowListItem property to designate or discover which ToolStripMenuItem displays MDI children.

Use the MenuActivate and MenuDeactivate events on child menus to reflect changes to the value of MdiWindowListItem.

The following code example demonstrates the MdiWindowListItem property. This example is part of a larger example provided for the ToolStripPanel class.

// Create a MenuStrip control with a new window.
MenuStrip ms = new MenuStrip();
ToolStripMenuItem windowMenu = new ToolStripMenuItem("Window");
ToolStripMenuItem windowNewMenu = new ToolStripMenuItem("New", null, new EventHandler(windowNewMenu_Click));
windowMenu.DropDownItems.Add(windowNewMenu);
((ToolStripDropDownMenu)(windowMenu.DropDown)).ShowImageMargin = false;
((ToolStripDropDownMenu)(windowMenu.DropDown)).ShowCheckMargin = true;

// Assign the ToolStripMenuItem that displays 
// the list of child forms.
ms.MdiWindowListItem = windowMenu;

// Add the window ToolStripMenuItem to the MenuStrip.
ms.Items.Add(windowMenu);

// Dock the MenuStrip to the top of the form.
ms.Dock = DockStyle.Top;

// The Form.MainMenuStrip property determines the merge target.
this.MainMenuStrip = ms;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: