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)

適用対象

こちらもご覧ください