DataGridViewColumnDesignTimeVisibleAttribute DataGridViewColumnDesignTimeVisibleAttribute DataGridViewColumnDesignTimeVisibleAttribute DataGridViewColumnDesignTimeVisibleAttribute Class

定义

指定列类型在 DataGridView 设计器中是否可见。Specifies whether a column type is visible in the DataGridView designer. 此类不能被继承。This class cannot be inherited.

public ref class DataGridViewColumnDesignTimeVisibleAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class DataGridViewColumnDesignTimeVisibleAttribute : Attribute
type DataGridViewColumnDesignTimeVisibleAttribute = class
    inherit Attribute
Public NotInheritable Class DataGridViewColumnDesignTimeVisibleAttribute
Inherits Attribute
继承
DataGridViewColumnDesignTimeVisibleAttributeDataGridViewColumnDesignTimeVisibleAttributeDataGridViewColumnDesignTimeVisibleAttributeDataGridViewColumnDesignTimeVisibleAttribute
属性

注解

默认情况下,类型派生自DataGridViewColumn出现在DataGridView特定于控件的部分的 Visual Studio 设计器中,但继承DesignTimeVisibleAttributeNo以防止其出现在设计器的其他部分。By default, types derived from DataGridViewColumn appear in DataGridView control-specific parts of the Visual Studio designer, but inherit a DesignTimeVisibleAttribute of No to prevent them from appearing in other parts of the designer. 这是必需的因为DataGridViewColumn类型实现IComponent接口,它通常使设计器中显示类型的实例。This is necessary because the DataGridViewColumn type implements the IComponent interface, which normally makes an instance of the type appear in the designer.

使用此属性可防止DataGridViewColumn出现在类型DataGridView特定于控件的设计器。Use this attribute to prevent a DataGridViewColumn type from appearing in the DataGridView control-specific designer.

有关使用属性的详细信息,请参阅属性For more information about using attributes, see Attributes.

构造函数

DataGridViewColumnDesignTimeVisibleAttribute() DataGridViewColumnDesignTimeVisibleAttribute() DataGridViewColumnDesignTimeVisibleAttribute() DataGridViewColumnDesignTimeVisibleAttribute()

使用默认的 DataGridViewColumnDesignTimeVisibleAttribute 的属性值 true 初始化 Visible 类的新实例。Initializes a new instance of the DataGridViewColumnDesignTimeVisibleAttribute class using the default Visible property value of true.

DataGridViewColumnDesignTimeVisibleAttribute(Boolean) DataGridViewColumnDesignTimeVisibleAttribute(Boolean) DataGridViewColumnDesignTimeVisibleAttribute(Boolean) DataGridViewColumnDesignTimeVisibleAttribute(Boolean)

使用用来初始化 DataGridViewColumnDesignTimeVisibleAttribute 属性的指定值初始化 Visible 类的新实例。Initializes a new instance of the DataGridViewColumnDesignTimeVisibleAttribute class using the specified value to initialize the Visible property.

字段

Default Default Default Default

默认的 DataGridViewColumnDesignTimeVisibleAttribute 值为 Yes,它指示列在 DataGridView 设计器中可见。The default DataGridViewColumnDesignTimeVisibleAttribute value, which is Yes, indicating that the column is visible in the DataGridView designer.

No No No No

一个 DataGridViewColumnDesignTimeVisibleAttribute 值,它指示列在 DataGridView 设计器中不可见。A DataGridViewColumnDesignTimeVisibleAttribute value indicating that the column is not visible in the DataGridView designer.

Yes Yes Yes Yes

一个 DataGridViewColumnDesignTimeVisibleAttribute 值,它指示列在 DataGridView 设计器中可见。A DataGridViewColumnDesignTimeVisibleAttribute value indicating that the column is visible in the DataGridView designer.

属性

TypeId TypeId TypeId TypeId

在派生类中实现时,获取此 Attribute 的唯一标识符。When implemented in a derived class, gets a unique identifier for this Attribute.

(Inherited from Attribute)
Visible Visible Visible Visible

获取一个值,该值指示列类型在 DataGridView 设计器中是否可见。Gets a value indicating whether the column type is visible in the DataGridView designer.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

获取指示此对象是否与指定对象等效的值。Gets a value indicating whether this object is equivalent to the specified object.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

返回此实例的哈希代码。Returns the hash code for this instance.

GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
IsDefaultAttribute() IsDefaultAttribute() IsDefaultAttribute() IsDefaultAttribute()

获取一个值,该值指示此特性的实例是否等于 Default 特性值。Gets a value indicating whether this attribute instance is equal to the Default attribute value.

Match(Object) Match(Object) Match(Object) Match(Object)

当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(Inherited from Attribute)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

将一组名称映射为对应的一组调度标识符。Maps a set of names to a corresponding set of dispatch identifiers.

(Inherited from Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

检索对象的类型信息,然后可以使用该信息获取接口的类型信息。Retrieves the type information for an object, which can be used to get the type information for an interface.

(Inherited from Attribute)
_Attribute.GetTypeInfoCount(UInt32) _Attribute.GetTypeInfoCount(UInt32) _Attribute.GetTypeInfoCount(UInt32) _Attribute.GetTypeInfoCount(UInt32)

检索对象提供的类型信息接口的数量(0 或 1)。Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Inherited from Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供对某一对象公开的属性和方法的访问。Provides access to properties and methods exposed by an object.

(Inherited from Attribute)

适用于

另请参阅