DesignTimeVisibleAttribute Класс

Определение

DesignTimeVisibleAttribute marks a component's visibility.DesignTimeVisibleAttribute marks a component's visibility. If Yes is present, a visual designer can show this component on a designer.If Yes is present, a visual designer can show this component on a designer.

public ref class DesignTimeVisibleAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface)]
public sealed class DesignTimeVisibleAttribute : Attribute
type DesignTimeVisibleAttribute = class
    inherit Attribute
Public NotInheritable Class DesignTimeVisibleAttribute
Inherits Attribute
Наследование
DesignTimeVisibleAttribute
Атрибуты

Комментарии

DesignTimeVisibleAttribute является указанием конструктора.The DesignTimeVisibleAttribute is a hint to the Designer. Конструктор будет игнорировать этот атрибут для компонентов, имеющих присутствие пользовательского интерфейса.The Designer will ignore this attribute for components that have a UI presence. Его можно применять только к классам.It can only be applied to classes.

DesignTimeVisibleAttribute наиболее полезна при наличии элемента управления, который принимает дочерние компоненты.The DesignTimeVisibleAttribute is most useful when you have a control that accepts child components. Например, элементы узла элемента управления System.Windows.Forms.TreeView не должны отображаться в области компонентов, поскольку они рисуются элементом управления System.Windows.Forms.TreeView.For example, the System.Windows.Forms.TreeView control's node items should not appear in the component tray because they are drawn by the System.Windows.Forms.TreeView control.

Конструкторы

DesignTimeVisibleAttribute()

Creates a new DesignTimeVisibleAttribute set to the default value of false.Creates a new DesignTimeVisibleAttribute set to the default value of false.

DesignTimeVisibleAttribute(Boolean)

Creates a new DesignTimeVisibleAttribute with the Visible property set to the given value in visible.Creates a new DesignTimeVisibleAttribute with the Visible property set to the given value in visible.

Поля

Default

The default visibility which is Yes.The default visibility which is Yes.

No

Marks a component as not visible in a visual designer.Marks a component as not visible in a visual designer.

Yes

Marks a component as visible in a visual designer.Marks a component as visible in a visual designer.

Свойства

TypeId

When implemented in a derived class, gets a unique identifier for this Attribute.When implemented in a derived class, gets a unique identifier for this Attribute.

(Унаследовано от Attribute)
Visible

Gets or sets whether the component should be shown at design time.Gets or sets whether the component should be shown at design time.

Методы

Equals(Object)

Returns a value that indicates whether this instance is equal to a specified object.Returns a value that indicates whether this instance is equal to a specified object.

GetHashCode()

Returns the hash code for this instance.Returns the hash code for this instance.

GetType()

Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance.

(Унаследовано от Object)
IsDefaultAttribute()

Gets a value indicating if this instance is equal to the Default value.Gets a value indicating if this instance is equal to the Default value.

Match(Object)

When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(Унаследовано от Attribute)
MemberwiseClone()

Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object.

(Унаследовано от Object)
ToString()

Возвращает строку, представляющую текущий объект.Returns a string that represents the current object.

(Унаследовано от Object)

Явные реализации интерфейса

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

Maps a set of names to a corresponding set of dispatch identifiers.Maps a set of names to a corresponding set of dispatch identifiers.

(Унаследовано от Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Retrieves the type information for an object, which can be used to get the type information for an interface.Retrieves the type information for an object, which can be used to get the type information for an interface.

(Унаследовано от Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Retrieves the number of type information interfaces that an object provides (either 0 or 1).Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Унаследовано от Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Provides access to properties and methods exposed by an object.Provides access to properties and methods exposed by an object.

(Унаследовано от Attribute)

Применяется к