MenuStrip.MdiWindowListItem MenuStrip.MdiWindowListItem MenuStrip.MdiWindowListItem MenuStrip.MdiWindowListItem Property

定義

取得または設定します、ToolStripMenuItemマルチ ドキュメント インターフェイス (MDI) 子フォームの一覧を表示するために使用されます。Gets or sets the ToolStripMenuItem that is used to display a list of Multiple-document interface (MDI) child forms.

public:
 property System::Windows::Forms::ToolStripMenuItem ^ MdiWindowListItem { System::Windows::Forms::ToolStripMenuItem ^ get(); void set(System::Windows::Forms::ToolStripMenuItem ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.MdiWindowListItemConverter))]
public System.Windows.Forms.ToolStripMenuItem MdiWindowListItem { get; set; }
member this.MdiWindowListItem : System.Windows.Forms.ToolStripMenuItem with get, set
Public Property MdiWindowListItem As ToolStripMenuItem

プロパティ値

AToolStripMenuItemアプリケーションで開いている MDI 子フォームの一覧を表示するメニュー項目を表します。A ToolStripMenuItem that represents the menu item displaying a list of MDI child forms that are open in the application.

次のコード例に示します、MdiWindowListItemプロパティ。The following code example demonstrates the MdiWindowListItem property. この例が示されている例の一部、ToolStripPanelクラス。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;
' Create a MenuStrip control with a new window.
Dim ms As New MenuStrip()
Dim windowMenu As New ToolStripMenuItem("Window")
Dim windowNewMenu As New ToolStripMenuItem("New", Nothing, New EventHandler(AddressOf windowNewMenu_Click))
windowMenu.DropDownItems.Add(windowNewMenu)
CType(windowMenu.DropDown, ToolStripDropDownMenu).ShowImageMargin = False
CType(windowMenu.DropDown, ToolStripDropDownMenu).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.
Me.MainMenuStrip = ms

注釈

使用して、MdiWindowListItemプロパティを指定するかを検出するToolStripMenuItemMDI 子フォームを表示します。Use the MdiWindowListItem property to designate or discover which ToolStripMenuItem displays MDI children.

使用して、MenuActivateMenuDeactivateの値の変更を反映するように子メニュー上のイベントMdiWindowListItemします。Use the MenuActivate and MenuDeactivate events on child menus to reflect changes to the value of MdiWindowListItem.

適用対象