ToolboxItemAttribute クラス

定義

ツールボックス項目の属性を表します。

public ref class ToolboxItemAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.All)]
public class ToolboxItemAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.All)>]
type ToolboxItemAttribute = class
    inherit Attribute
Public Class ToolboxItemAttribute
Inherits Attribute
継承
ToolboxItemAttribute
属性

次のコード例では、 クラスをToolboxItemカスタム ツールボックス項目実装の基本クラスとして 使用ToolboxItemAttributeする方法を示します。 このコード例は、ToolboxItem クラスのために提供されている大規模な例の一部です。

[ToolboxItem(typeof(MyToolboxItem))]
public class UserControl1 : UserControl
<ToolboxItem(GetType(MyToolboxItem))> _
Public Class UserControl1
    Inherits UserControl

注釈

クラスは ToolboxItemAttribute 、 の属性を指定する方法を ToolboxItem提供します。 クラスが提供する Attribute 内容に加えて、オブジェクトのこのクラスはツールボックス項目の型を格納します。

コンストラクター

ToolboxItemAttribute(Boolean)

ToolboxItemAttribute クラスの新しいインスタンスを初期化し、既定の初期値を使用するかどうかを指定します。

ToolboxItemAttribute(String)

指定した名前と型を使用して、ToolboxItemAttribute クラスの新しいインスタンスを初期化します。

ToolboxItemAttribute(Type)

指定したツールボックス項目の型を使用して、ToolboxItemAttribute クラスの新しいインスタンスを初期化します。

フィールド

Default

ToolboxItemAttribute クラスの新しいインスタンスを初期化し、ツールボックス項目の型を既定の ToolboxItem に設定します。 このフィールドは読み取り専用です。

None

ToolboxItemAttribute クラスの新しいインスタンスを初期化し、ツールボックス項目の型を null に設定します。 このフィールドは読み取り専用です。

プロパティ

ToolboxItemType

ツールボックス項目の型を取得または設定します。

ToolboxItemTypeName

現在の ToolboxItem の型名を取得または設定します。

TypeId

派生クラスで実装されると、この Attribute の一意の識別子を取得します。

(継承元 Attribute)

メソッド

Equals(Object)

このインスタンスが、指定されたオブジェクトと等価であるかどうかを示す値を返します。

GetHashCode()

このインスタンスのハッシュ コードを返します。

GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()

属性の現在の値が既定値かどうかを示す値を取得します。

Match(Object)

派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

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

一連の名前を対応する一連のディスパッチ識別子に割り当てます。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

オブジェクトの型情報を取得します。この情報はインターフェイスの型情報の取得に使用できます。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

オブジェクトによって公開されたプロパティおよびメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象

こちらもご覧ください