ToolboxItemAttribute Clase
Definición
Representa un atributo de un elemento del cuadro de herramientas.Represents an attribute of a toolbox item.
public ref class ToolboxItemAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.All)]
public class ToolboxItemAttribute : Attribute
type ToolboxItemAttribute = class
inherit Attribute
Public Class ToolboxItemAttribute
Inherits Attribute
- Herencia
- Atributos
Ejemplos
En el ejemplo de código siguiente se muestra ToolboxItemAttribute el uso ToolboxItem de con la clase como una clase base para una implementación de elemento del cuadro de herramientas personalizada.The following code example demonstrates the use of ToolboxItemAttribute with the ToolboxItem class as a base class for a custom toolbox item implementation. Este ejemplo de código forma parte de un ejemplo más extenso proporcionado ToolboxItem para la clase.This code example is part of a larger example provided for the ToolboxItem class.
[ToolboxItem(typeof(MyToolboxItem))]
public class UserControl1 : UserControl
<ToolboxItem(GetType(MyToolboxItem))> _
Public Class UserControl1
Inherits UserControl
Comentarios
La ToolboxItemAttribute clase proporciona una manera de especificar un atributo para un ToolboxItem.The ToolboxItemAttribute class provides a way to specify an attribute for a ToolboxItem. Además de lo que proporciona Attribute la clase, esta clase de objeto almacena el tipo del elemento del cuadro de herramientas.In addition to what the Attribute class provides, this class of object stores the type of the toolbox item.
Constructores
ToolboxItemAttribute(Boolean) |
Inicializa una nueva instancia de la clase ToolboxItemAttribute y especifica si se van a utilizar los valores de inicialización predeterminados.Initializes a new instance of the ToolboxItemAttribute class and specifies whether to use default initialization values. |
ToolboxItemAttribute(String) |
Inicializa una nueva instancia de la clase ToolboxItemAttribute con el nombre especificado del tipo.Initializes a new instance of the ToolboxItemAttribute class using the specified name of the type. |
ToolboxItemAttribute(Type) |
Inicializa una nueva instancia de la clase ToolboxItemAttribute utilizando el tipo especificado de elemento del cuadro de herramientas.Initializes a new instance of the ToolboxItemAttribute class using the specified type of the toolbox item. |
Campos
Default |
Inicializa una nueva instancia de la clase ToolboxItemAttribute y establece el tipo en el valor predeterminado, ToolboxItem.Initializes a new instance of the ToolboxItemAttribute class and sets the type to the default, ToolboxItem. Este campo es de solo lectura.This field is read-only. |
None |
Inicializa una nueva instancia de la clase ToolboxItemAttribute y establece el tipo en |
Propiedades
ToolboxItemType |
Obtiene o establece el tipo de elemento del cuadro de herramientas.Gets or sets the type of the toolbox item. |
ToolboxItemTypeName |
Obtiene o establece el nombre del tipo del ToolboxItem actual.Gets or sets the name of the type of the current ToolboxItem. |
TypeId |
Cuando se implementa en una clase derivada, obtiene un identificador único para este Attribute.When implemented in a derived class, gets a unique identifier for this Attribute. (Heredado de Attribute) |
Métodos
Equals(Object) |
Devuelve un valor que indica si esta instancia es igual que un objeto especificado.Returns a value that indicates whether this instance is equal to a specified object. |
GetHashCode() |
Devuelve el código hash de esta instancia.Returns the hash code for this instance. |
GetType() |
Obtiene el Type de la instancia actual.Gets the Type of the current instance. (Heredado de Object) |
IsDefaultAttribute() |
Obtiene un valor que indica si el valor actual del atributo es su valor predeterminado.Gets a value indicating whether the current value of the attribute is the default value for the attribute. |
Match(Object) |
Cuando se invalida en una clase derivada, devuelve un valor que indica si esta instancia es igual a un objeto especificado.When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Heredado de Attribute) |
MemberwiseClone() |
Crea una copia superficial del Object actual.Creates a shallow copy of the current Object. (Heredado de Object) |
ToString() |
Devuelve un valor de tipo string que representa el objeto actual.Returns a string that represents the current object. (Heredado de Object) |
Implementaciones de interfaz explícitas
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) |
Asigna un conjunto de nombres a un conjunto correspondiente de identificadores de envío.Maps a set of names to a corresponding set of dispatch identifiers. (Heredado de Attribute) |
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) |
Obtiene la información de tipos de un objeto, que puede utilizarse para obtener la información de tipos de una interfaz.Retrieves the type information for an object, which can be used to get the type information for an interface. (Heredado de Attribute) |
_Attribute.GetTypeInfoCount(UInt32) |
Recupera el número de interfaces de información de tipo que proporciona un objeto (0 ó 1).Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Heredado de Attribute) |
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) |
Proporciona acceso a las propiedades y los métodos expuestos por un objeto.Provides access to properties and methods exposed by an object. (Heredado de Attribute) |