|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Menu.MenuItems Propriedade
Assembly: System.Windows.Forms (em System.Windows.Forms. dll)
Valor da propriedade
Tipo: System.Windows.Forms.Menu.MenuItemCollectionprivate void InitializeMyMainMenu() { // Create the MainMenu and the MenuItem to add. MainMenu mainMenu1 = new MainMenu(); MenuItem menuItem1 = new MenuItem("&File"); /* Use the MenuItems property to call the Add method to add the MenuItem to the MainMenu menu item collection. */ mainMenu1.MenuItems.Add (menuItem1); // Assign mainMenu1 to the form. this.Menu = mainMenu1; }
private void InitializeMyMainMenu()
{
// Create the MainMenu and the MenuItem to add.
MainMenu mainMenu1 = new MainMenu();
MenuItem menuItem1 = new MenuItem("&File");
/* Use the MenuItems property to call the Add method
to add the MenuItem to the MainMenu menu item collection.
*/
mainMenu1.get_MenuItems().Add(menuItem1);
// Assign mainMenu1 to the form.
this.set_Menu(mainMenu1);
} //InitializeMyMainMenu