Menu.MenuItemCollection Classe
Definição
public: ref class Menu::MenuItemCollection : System::Collections::IList
[System.ComponentModel.ListBindable(false)]
public class Menu.MenuItemCollection : System.Collections.IList
[<System.ComponentModel.ListBindable(false)>]
type Menu.MenuItemCollection = class
interface IList
interface ICollection
interface IEnumerable
Public Class Menu.MenuItemCollection
Implements IList
- Herança
-
Menu.MenuItemCollection
- Atributos
- Implementações
Comentários
Essa classe representa a coleção de MenuItem objetos armazenados em um MainMenu , ContextMenu ou MenuItem .This class represents the collection of MenuItem objects stored in a MainMenu, ContextMenu, or MenuItem. Para as MainMenu ContextMenu classes e, essa coleção representa a estrutura de menu inteira para o controle.For the MainMenu and ContextMenu classes, this collection represents the entire menu structure for the control. Para a MenuItem classe, essa coleção representa a lista de itens de submenu associados ao MenuItem .For the MenuItem class, this collection represents the list of submenu items associated with the MenuItem.
Os Add Remove métodos e permitem adicionar e remover itens de menu individuais da coleção.The Add and Remove methods enable you to add and remove individual menu items from the collection. Você também pode usar o Clear método para remover todos os itens de menu da coleção.You can also use the Clear method to remove all the menu items from the collection.
Construtores
| Menu.MenuItemCollection(Menu) |
Inicializa uma nova instância da classe Menu.MenuItemCollection.Initializes a new instance of the Menu.MenuItemCollection class. |
Propriedades
| Count |
Obtém um valor que indica o número total de objetos MenuItem na coleção.Gets a value indicating the total number of MenuItem objects in the collection. |
| IsReadOnly |
Obtém um valor que indica se a coleção é somente leitura.Gets a value indicating whether the collection is read-only. |
| Item[Int32] |
Recupera o MenuItem no local indexado especificado na coleção.Retrieves the MenuItem at the specified indexed location in the collection. |
| Item[String] |
Obtém um item com a chave especificada da coleção.Gets an item with the specified key from the collection. |
Métodos
| Add(Int32, MenuItem) |
Adiciona um MenuItem criado anteriormente no índice especificado na coleção de itens de menu.Adds a previously created MenuItem at the specified index within the menu item collection. |
| Add(MenuItem) |
Adiciona um MenuItem criado anteriormente ao final do menu atual.Adds a previously created MenuItem to the end of the current menu. |
| Add(String) |
Adiciona um novo MenuItem, até o final do menu atual, com uma legenda especificada.Adds a new MenuItem, to the end of the current menu, with a specified caption. |
| Add(String, EventHandler) |
Adiciona um novo MenuItem no final do menu atual com uma legenda especificada e um manipulador de eventos especificado para o evento Click.Adds a new MenuItem to the end of the current menu with a specified caption and a specified event handler for the Click event. |
| Add(String, MenuItem[]) |
Adiciona um novo MenuItem ao final nesse menu com a legenda, manipulador de eventos Click e itens especificados.Adds a new MenuItem to the end of this menu with the specified caption, Click event handler, and items. |
| AddRange(MenuItem[]) |
Adiciona uma matriz de objetos MenuItem criados anteriormente à coleção.Adds an array of previously created MenuItem objects to the collection. |
| Clear() |
Remove todos os objetos MenuItem da coleção de itens de menu.Removes all MenuItem objects from the menu item collection. |
| Contains(MenuItem) |
Determina se o MenuItem especificado é membro da coleção.Determines if the specified MenuItem is a member of the collection. |
| ContainsKey(String) |
Determina se a coleção contém um item com a chave especificada.Determines whether the collection contains an item with the specified key. |
| CopyTo(Array, Int32) |
Copia toda a coleção em uma matriz existente de um local especificado na matriz.Copies the entire collection into an existing array at a specified location within the array. |
| Equals(Object) |
Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object. (Herdado de Object) |
| Find(String, Boolean) |
Encontra os itens com a chave especificada, com a opção de pesquisar os itens de submenu.Finds the items with the specified key, optionally searching the submenu items. |
| GetEnumerator() |
Retorna um enumerador que pode ser usado para iterar na coleção de itens de menu.Returns an enumerator that can be used to iterate through the menu item collection. |
| GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| IndexOf(MenuItem) |
Recupera o índice de um item específico na coleção.Retrieves the index of a specific item in the collection. |
| IndexOfKey(String) |
Localiza o índice da primeira ocorrência de um item de menu com a chave especificada.Finds the index of the first occurrence of a menu item with the specified key. |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| Remove(MenuItem) |
Remove o MenuItem especificado da coleção de itens de menu.Removes the specified MenuItem from the menu item collection. |
| RemoveAt(Int32) |
Remove um MenuItem da coleção de itens de menu em um índice especificado.Removes a MenuItem from the menu item collection at a specified index. |
| RemoveByKey(String) |
Remove o item de menu com a chave especificada da coleção.Removes the menu item with the specified key from the collection. |
| ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |
Implantações explícitas de interface
| ICollection.IsSynchronized |
Para obter uma descrição desse membro, confira IsSynchronized.For a description of this member, see IsSynchronized. |
| ICollection.SyncRoot |
Para obter uma descrição desse membro, confira SyncRoot.For a description of this member, see SyncRoot. |
| IList.Add(Object) |
Para obter uma descrição desse membro, confira Add(Object).For a description of this member, see Add(Object). |
| IList.Contains(Object) |
Para obter uma descrição desse membro, confira Contains(Object).For a description of this member, see Contains(Object). |
| IList.IndexOf(Object) |
Para obter uma descrição desse membro, confira IndexOf(Object).For a description of this member, see IndexOf(Object). |
| IList.Insert(Int32, Object) |
Para obter uma descrição desse membro, confira Insert(Int32, Object).For a description of this member, see Insert(Int32, Object). |
| IList.IsFixedSize |
Para obter uma descrição desse membro, confira IsFixedSize.For a description of this member, see IsFixedSize. |
| IList.Item[Int32] |
Para obter uma descrição desse membro, confira Item[Int32].For a description of this member, see Item[Int32]. |
| IList.Remove(Object) |
Para obter uma descrição desse membro, confira Remove(Object).For a description of this member, see Remove(Object). |
Métodos de Extensão
| Cast<TResult>(IEnumerable) |
Converte os elementos de um IEnumerable para o tipo especificado.Casts the elements of an IEnumerable to the specified type. |
| OfType<TResult>(IEnumerable) |
Filtra os elementos de um IEnumerable com base em um tipo especificado.Filters the elements of an IEnumerable based on a specified type. |
| AsParallel(IEnumerable) |
Habilita a paralelização de uma consulta.Enables parallelization of a query. |
| AsQueryable(IEnumerable) |
Converte um IEnumerable em um IQueryable.Converts an IEnumerable to an IQueryable. |