MenuStrip.MdiWindowListItem Propriedade
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém ou define o ToolStripMenuItem usado para exibir uma lista de formulários filho da interface MDI.
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; }
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.MdiWindowListItemConverter))]
public System.Windows.Forms.ToolStripMenuItem? MdiWindowListItem { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.MdiWindowListItemConverter))>]
member this.MdiWindowListItem : System.Windows.Forms.ToolStripMenuItem with get, set
Public Property MdiWindowListItem As ToolStripMenuItem
Valor da propriedade
Um ToolStripMenuItem que representa o item de menu que exibe uma lista dos formulários filho MDI abertos no aplicativo.
- Atributos
Exemplos
O exemplo de código a seguir demonstra a MdiWindowListItem propriedade . Este exemplo faz parte de um exemplo maior fornecido para a ToolStripPanel classe .
// 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
Comentários
Use a MdiWindowListItem propriedade para designar ou descobrir o que ToolStripMenuItem exibe filhos MDI.
Use os MenuActivate eventos e MenuDeactivate nos menus filho para refletir as alterações no valor de MdiWindowListItem.