DesignerActionItemCollection クラス

定義

DesignerActionItem オブジェクトのコレクションを表します。

public ref class DesignerActionItemCollection : System::Collections::CollectionBase
public class DesignerActionItemCollection : System.Collections.CollectionBase
type DesignerActionItemCollection = class
    inherit CollectionBase
Public Class DesignerActionItemCollection
Inherits CollectionBase
継承
DesignerActionItemCollection

次のコード例は、スマート タグ リストを作成 DesignerActionItemCollection して設定する方法を示しています。 このコード例は、DesignerActionItem クラスのために提供されている大規模な例の一部です。

public override DesignerActionItemCollection GetSortedActionItems()
{
    DesignerActionItemCollection items = new DesignerActionItemCollection();

    //Define static section header entries.
    items.Add(new DesignerActionHeaderItem("Appearance"));
    items.Add(new DesignerActionHeaderItem("Information"));

    //Boolean property for locking color selections.
    items.Add(new DesignerActionPropertyItem("LockColors",
                     "Lock Colors", "Appearance",
                     "Locks the color properties."));
    if (!LockColors)
    {
        items.Add(new DesignerActionPropertyItem("BackColor",
                         "Back Color", "Appearance",
                         "Selects the background color."));
        items.Add(new DesignerActionPropertyItem("ForeColor",
                         "Fore Color", "Appearance",
                         "Selects the foreground color."));

        //This next method item is also added to the context menu 
        // (as a designer verb).
        items.Add(new DesignerActionMethodItem(this,
                         "InvertColors", "Invert Colors",
                         "Appearance",
                         "Inverts the fore and background colors.",
                          true));
    }
    items.Add(new DesignerActionPropertyItem("Text",
                     "Text String", "Appearance",
                     "Sets the display text."));

    //Create entries for static Information section.
    StringBuilder location = new StringBuilder("Location: ");
    location.Append(colLabel.Location);
    StringBuilder size = new StringBuilder("Size: ");
    size.Append(colLabel.Size);
    items.Add(new DesignerActionTextItem(location.ToString(),
                     "Information"));
    items.Add(new DesignerActionTextItem(size.ToString(),
                     "Information"));

    return items;
}
Public Overrides Function GetSortedActionItems() _
As DesignerActionItemCollection
    Dim items As New DesignerActionItemCollection()

    'Define static section header entries.
    items.Add(New DesignerActionHeaderItem("Appearance"))
    items.Add(New DesignerActionHeaderItem("Information"))

    'Boolean property for locking color selections.
    items.Add(New DesignerActionPropertyItem( _
    "LockColors", _
    "Lock Colors", _
    "Appearance", _
    "Locks the color properties."))

    If Not LockColors Then
        items.Add( _
        New DesignerActionPropertyItem( _
        "BackColor", _
        "Back Color", _
        "Appearance", _
        "Selects the background color."))

        items.Add( _
        New DesignerActionPropertyItem( _
        "ForeColor", _
        "Fore Color", _
        "Appearance", _
        "Selects the foreground color."))

        'This next method item is also added to the context menu 
        ' (as a designer verb).
        items.Add( _
        New DesignerActionMethodItem( _
        Me, _
        "InvertColors", _
        "Invert Colors", _
        "Appearance", _
        "Inverts the fore and background colors.", _
        True))
    End If
    items.Add( _
    New DesignerActionPropertyItem( _
    "Text", _
    "Text String", _
    "Appearance", _
    "Sets the display text."))

    'Create entries for static Information section.
    Dim location As New StringBuilder("Location: ")
    location.Append(colLabel.Location)
    Dim size As New StringBuilder("Size: ")
    size.Append(colLabel.Size)

    items.Add( _
    New DesignerActionTextItem( _
    location.ToString(), _
    "Information"))

    items.Add( _
    New DesignerActionTextItem( _
    size.ToString(), _
    "Information"))

    Return items
End Function

コンストラクター

DesignerActionItemCollection()

DesignerActionItemCollection クラスの新しいインスタンスを初期化します。

プロパティ

Capacity

CollectionBase に格納できる要素の数を取得または設定します。

(継承元 CollectionBase)
Count

CollectionBase インスタンスに含まれる要素の数を取得します。 このプロパティはオーバーライドできません。

(継承元 CollectionBase)
InnerList

ArrayList インスタンス内の要素のリストを格納する CollectionBase を取得します。

(継承元 CollectionBase)
Item[Int32]

指定したインデックスにある要素を取得または設定します。

List

IList インスタンス内の要素のリストを格納する CollectionBase を取得します。

(継承元 CollectionBase)

メソッド

Add(DesignerActionItem)

指定した DesignerActionItem を現在のコレクションに追加します。

Clear()

CollectionBase インスタンスからすべてのオブジェクトを削除します。 このメソッドはオーバーライドできません。

(継承元 CollectionBase)
Contains(DesignerActionItem)

DesignerActionItemCollection に特定の要素が格納されているかどうかを判断します。

CopyTo(DesignerActionItem[], Int32)

指定した配列インデックスを開始位置として、現在のコレクションの要素を指定した配列にコピーします。

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetEnumerator()

CollectionBase インスタンスを反復処理する列挙子を返します。

(継承元 CollectionBase)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

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

(継承元 Object)
IndexOf(DesignerActionItem)

コレクション内での指定した項目のインデックスを調べます。

Insert(Int32, DesignerActionItem)

DesignerActionItemCollection 内の指定したインデックスの位置に要素を挿入します。

MemberwiseClone()

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

(継承元 Object)
OnClear()

CollectionBase インスタンスの内容を消去しているときに、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnClearComplete()

CollectionBase インスタンスの内容を消去した後に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnInsert(Int32, Object)

CollectionBase インスタンスに新しい要素を挿入する前に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnInsertComplete(Int32, Object)

CollectionBase インスタンスに新しい要素を挿入した後に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnRemove(Int32, Object)

CollectionBase インスタンスから要素を削除するときに、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnRemoveComplete(Int32, Object)

CollectionBase インスタンスから要素を削除した後に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnSet(Int32, Object, Object)

CollectionBase インスタンスに値を設定する前に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnSetComplete(Int32, Object, Object)

CollectionBase インスタンスに値を設定した後に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnValidate(Object)

値を検証するときに、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
Remove(DesignerActionItem)

特定のオブジェクトが DesignerActionItemCollection 内にあるときに、最初に出現したものを削除します。

RemoveAt(Int32)

CollectionBase インスタンスの指定したインデックスにある要素を削除します。 このメソッドはオーバーライドできません。

(継承元 CollectionBase)
ToString()

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

(継承元 Object)

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

ICollection.CopyTo(Array, Int32)

CollectionBase 全体を互換性のある 1 次元の Array にコピーします。コピー操作は、コピー先の配列の指定したインデックスから始まります。

(継承元 CollectionBase)
ICollection.IsSynchronized

CollectionBase へのアクセスが同期されている (スレッド セーフである) かどうかを示す値を取得します。

(継承元 CollectionBase)
ICollection.SyncRoot

CollectionBase へのアクセスを同期するために使用できるオブジェクトを取得します。

(継承元 CollectionBase)
IList.Add(Object)

CollectionBase の末尾にオブジェクトを追加します。

(継承元 CollectionBase)
IList.Contains(Object)

CollectionBase に特定の要素が格納されているかどうかを判断します。

(継承元 CollectionBase)
IList.IndexOf(Object)

指定した Object を検索し、CollectionBase 全体内で最初に見つかった位置の 0 から始まるインデックスを返します。

(継承元 CollectionBase)
IList.Insert(Int32, Object)

CollectionBase 内の指定したインデックスの位置に要素を挿入します。

(継承元 CollectionBase)
IList.IsFixedSize

CollectionBase が固定サイズかどうかを示す値を取得します。

(継承元 CollectionBase)
IList.IsReadOnly

CollectionBase が読み取り専用かどうかを示す値を取得します。

(継承元 CollectionBase)
IList.Item[Int32]

指定したインデックスにある要素を取得または設定します。

(継承元 CollectionBase)
IList.Remove(Object)

特定のオブジェクトが CollectionBase 内にあるときに、最初に出現したものを削除します。

(継承元 CollectionBase)

拡張メソッド

Cast<TResult>(IEnumerable)

IEnumerable の要素を、指定した型にキャストします。

OfType<TResult>(IEnumerable)

指定された型に基づいて IEnumerable の要素をフィルター処理します。

AsParallel(IEnumerable)

クエリの並列化を有効にします。

AsQueryable(IEnumerable)

IEnumerableIQueryable に変換します。

適用対象