MenuItemStyleCollectionEditor Classe
Definição
Fornece um editor de componente para objetos MenuItemStyleCollection no controle Menu associado.Provides a component editor for MenuItemStyleCollection objects in the associated Menu control.
public ref class MenuItemStyleCollectionEditor : System::ComponentModel::Design::CollectionEditor
public class MenuItemStyleCollectionEditor : System.ComponentModel.Design.CollectionEditor
type MenuItemStyleCollectionEditor = class
inherit CollectionEditor
Public Class MenuItemStyleCollectionEditor
Inherits CollectionEditor
- Herança
Exemplos
O exemplo de código a seguir mostra como usar o EditorAttribute atributo para associar MenuItemStyleCollectionEditor as UITypeEditor classes e (a classe base do editor de coleção) a uma propriedade em um controle personalizado, derivada da WebControl classe, que obtém e define uma MenuItemStyleCollection coleção.The following code example shows how to use the EditorAttribute attribute to associate the MenuItemStyleCollectionEditor and UITypeEditor classes (the collection editor base class) with a property in a custom control, derived from the WebControl class, that gets and sets a MenuItemStyleCollection collection.
private MenuItemStyleCollection menuItemStyles;
// Associate the MenuItemStyleCollectionEditor with the
// LevelMenuItemStyles.
[Editor(typeof(System.Web.UI.Design.WebControls.
MenuItemStyleCollectionEditor),
typeof(UITypeEditor))]
public MenuItemStyleCollection LevelMenuItemStyles
{
get { return menuItemStyles; }
set { menuItemStyles = value; }
} // LevelMenuItemStyles
Private menuItemStyles As MenuItemStyleCollection
' Associate the MenuItemStyleCollectionEditor with the
' LevelMenuItemStyles.
<EditorAttribute( GetType(System.Web.UI.Design.WebControls. _
MenuItemStyleCollectionEditor), _
GetType(UITypeEditor))> _
Public Property LevelMenuItemStyles() As MenuItemStyleCollection
Get
Return menuItemStyles
End Get
Set
menuItemStyles = value
End Set
End Property ' LevelMenuItemStyles
Comentários
A MenuItemStyleCollectionEditor classe fornece uma interface do usuário para editar os MenuItemStyle elementos de MenuItemStyleCollection objetos no Menu controle associado em tempo de design, sob o controle do MenuDesigner objeto.The MenuItemStyleCollectionEditor class provides a user interface for editing the MenuItemStyle elements of MenuItemStyleCollection objects in the associated Menu control at design time, under the control of the MenuDesigner object.
Há um MenuItemStyleCollection associado a cada uma das LevelMenuItemStyles Propriedades e LevelSelectedStyles do Menu controle.There is a MenuItemStyleCollection associated with each of the LevelMenuItemStyles and LevelSelectedStyles properties of the Menu control. Esses MenuItemStyleCollection objetos são usados para aplicar estilos a itens de menu que dependem de seu nível (profundidade de aninhamento) na estrutura do menu.These MenuItemStyleCollection objects are used to apply styles to menu items that depend on their level (nesting depth) in the menu structure.
O MenuItemStyleCollectionEditor é invocado, por exemplo, selecionando o botão de reticências (...) na linha LevelMenuItemStyles ou LevelSelectedStyles na grade de Propriedades do designer visual.The MenuItemStyleCollectionEditor is invoked, for example, by selecting the ellipsis button (…) on the LevelMenuItemStyles or LevelSelectedStyles row in the Properties grid of the visual designer.
O CanSelectMultipleInstances método sempre retorna false para indicar que apenas um objeto pode ser selecionado por vez no editor.The CanSelectMultipleInstances method always returns false to indicate that only one object can be selected at a time in the editor. O CreateCollectionForm método cria um novo formulário para exibir e editar o atual MenuItemStyleCollection .The CreateCollectionForm method creates a new form to display and edit the current MenuItemStyleCollection.
O CreateInstance método cria uma nova instância do tipo de item de coleta especificado.The CreateInstance method creates a new instance of the specified collection item type. O CreateNewItemTypes método retorna uma matriz de tipos que o editor pode criar.The CreateNewItemTypes method returns an array of types that the editor can create.
Construtores
| MenuItemStyleCollectionEditor(Type) |
Inicializa uma nova instância da classe MenuItemStyleCollectionEditor.Initializes a new instance of the MenuItemStyleCollectionEditor class. |
Propriedades
| CollectionItemType |
Obtém o tipo de dados de cada item na coleção.Gets the data type of each item in the collection. (Herdado de CollectionEditor) |
| CollectionType |
Obtém o tipo de dados do objeto da coleção.Gets the data type of the collection object. (Herdado de CollectionEditor) |
| Context |
Obtém um descritor de tipo que indica o contexto atual.Gets a type descriptor that indicates the current context. (Herdado de CollectionEditor) |
| HelpTopic |
Obtém a palavra-chave de Ajuda para exibir o tópico da Ajuda ou uma lista de tópicos para quando o botão de Ajuda da caixa de diálogo do editor ou a tecla F1 é pressionada.Gets the Help keyword to display the Help topic or topic list for when the editor's dialog box Help button or the F1 key is pressed. (Herdado de CollectionEditor) |
| IsDropDownResizable |
Obtém um valor que indica se os editores de lista suspensa devem ser redimensionáveis pelo usuário.Gets a value indicating whether drop-down editors should be resizable by the user. (Herdado de UITypeEditor) |
| NewItemTypes |
Obtém os tipos disponíveis de itens que podem ser criados para esta coleção.Gets the available types of items that can be created for this collection. (Herdado de CollectionEditor) |
Métodos
| CancelChanges() |
Cancela as alterações à coleção.Cancels changes to the collection. (Herdado de CollectionEditor) |
| CanRemoveInstance(Object) |
Indica se os membros originais da coleção podem ou não ser removidos.Indicates whether original members of the collection can be removed. (Herdado de CollectionEditor) |
| CanSelectMultipleInstances() |
Obtém um valor que indica se vários elementos MenuItemStyle podem ser selecionados no editor de uma só vez.Gets a value indicating whether multiple MenuItemStyle elements can be selected in the editor at one time. |
| CreateCollectionForm() |
Cria um novo formulário para exibir e editar o objeto MenuItemStyleCollection atual.Creates a new form to display and edit the current MenuItemStyleCollection object. |
| CreateCollectionItemType() |
Obtém o tipo de dados que essa coleção contém.Gets the data type that this collection contains. (Herdado de CollectionEditor) |
| CreateInstance(Type) |
Cria uma nova instância do tipo de item da coleção especificado.Creates a new instance of the specified collection item type. |
| CreateNewItemTypes() |
Obtém os tipos de dados que este editor de coleção pode criar.Gets the data types that this collection editor can create. |
| DestroyInstance(Object) |
Destrói a instância especificada do objeto.Destroys the specified instance of the object. (Herdado de CollectionEditor) |
| EditValue(IServiceProvider, Object) |
Edita o valor do objeto especificado usando o estilo de editor indicado pelo método GetEditStyle().Edits the value of the specified object using the editor style indicated by the GetEditStyle() method. (Herdado de UITypeEditor) |
| EditValue(ITypeDescriptorContext, IServiceProvider, Object) |
Edita o valor do objeto especificado usando o provedor de serviços e o contexto especificados.Edits the value of the specified object using the specified service provider and context. (Herdado de CollectionEditor) |
| 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) |
| GetDisplayText(Object) |
Recupera o texto de exibição para o item de lista especificado.Retrieves the display text for the given list item. (Herdado de CollectionEditor) |
| GetEditStyle() |
Obtém o estilo de editor usado pelo método EditValue(IServiceProvider, Object).Gets the editor style used by the EditValue(IServiceProvider, Object) method. (Herdado de UITypeEditor) |
| GetEditStyle(ITypeDescriptorContext) |
Obtém o estilo de edição usado pelo método EditValue(ITypeDescriptorContext, IServiceProvider, Object).Gets the edit style used by the EditValue(ITypeDescriptorContext, IServiceProvider, Object) method. (Herdado de CollectionEditor) |
| GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
| GetItems(Object) |
Obtém uma matriz de objetos que contém a coleção especificada.Gets an array of objects containing the specified collection. (Herdado de CollectionEditor) |
| GetObjectsFromInstance(Object) |
Retorna uma lista que contém o objeto fornecido.Returns a list containing the given object. (Herdado de CollectionEditor) |
| GetPaintValueSupported() |
Indica se esse editor é compatível com pintura de uma representação do valor de um objeto.Indicates whether this editor supports painting a representation of an object's value. (Herdado de UITypeEditor) |
| GetPaintValueSupported(ITypeDescriptorContext) |
Indica se o contexto especificado é compatível com pintura de uma representação do valor de um objeto no contexto especificado.Indicates whether the specified context supports painting a representation of an object's value within the specified context. (Herdado de UITypeEditor) |
| GetService(Type) |
Obtém o serviço solicitado, se ele está disponível.Gets the requested service, if it is available. (Herdado de CollectionEditor) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| PaintValue(Object, Graphics, Rectangle) |
Pinta uma representação do valor do objeto especificado na tela especificada.Paints a representation of the value of the specified object to the specified canvas. (Herdado de UITypeEditor) |
| PaintValue(PaintValueEventArgs) |
Pinta uma representação do valor de um objeto usando o PaintValueEventArgs especificado.Paints a representation of the value of an object using the specified PaintValueEventArgs. (Herdado de UITypeEditor) |
| SetItems(Object, Object[]) |
Define a matriz especificada como os itens da coleção.Sets the specified array as the items of the collection. (Herdado de CollectionEditor) |
| ShowHelp() |
Exibe o tópico da Ajuda padrão para o editor de coleção.Displays the default Help topic for the collection editor. (Herdado de CollectionEditor) |
| ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |