TemplateGroupCollection クラス
アセンブリ: System.Design (system.design.dll 内)


ControlDesigner クラスおよびすべての派生クラスでは、TemplateGroups プロパティは TemplateGroupCollection オブジェクトとして定義されます。TemplateGroupCollection プロパティは通常、Visual Studio 2005 などのデザイン ホストによってのみ使用されます。
コレクションのサイズは、オブジェクトが追加されるごとに動的に大きくなります。このコレクションのインデックスは 0 から始まります。コレクション内に存在するグループの数を確認するには、Count プロパティを使用します。

ControlDesigner クラスから派生する単純なコントロール デザイナを定義する方法を次のコード例に示します。派生コントロール デザイナは、基本クラスに対して定義されているテンプレート グループを取得し、派生コントロール デザイナに固有のテンプレート グループを追加して、TemplateGroups プロパティを実装します。
Imports System Imports System.Web.UI Imports System.Web.UI.Design Imports System.Web.UI.WebControls Imports System.Web.UI.Design.WebControls Imports System.ComponentModel Imports System.ComponentModel.Design Namespace Examples.AspNet ' Define a simple control designer that adds a ' template group to the template group collection. Class DerivedControlDesigner Inherits System.Web.UI.Design.ControlDesigner Private Dim internalControl As DerivedControl = Nothing Private Const templateGroupName As String = "My template group" Private Const templateDefinitionName1 As String = "First" Private Const templateDefinitionName2 As String = "Second" Private Dim internalGroup As TemplateGroup = Nothing ' Override the read-only TemplateGroups property. ' Get the base group collection, and add a group ' with two template definitions for the derived ' control designer. Public Overrides ReadOnly Property TemplateGroups As TemplateGroupCollection Get ' Start with the groups defined by the base designer class. Dim groups As TemplateGroupCollection = MyBase.TemplateGroups If internalGroup Is Nothing ' Define a new group with two template definitions. internalGroup = New TemplateGroup(templateGroupName, _ internalControl.ControlStyle) Dim templateDef1 As TemplateDefinition = new TemplateDefinition(Me, _ templateDefinitionName1, internalControl, _ templateDefinitionName1, internalControl.ControlStyle) Dim templateDef2 As TemplateDefinition = new TemplateDefinition(Me, _ templateDefinitionName2, internalControl, _ templateDefinitionName2, internalControl.ControlStyle) internalGroup.AddTemplateDefinition(templateDef1) internalGroup.AddTemplateDefinition(templateDef2) End If ' Add the new template group to the collection. groups.Add(internalGroup) return groups End Get End Property End Class ' Simple Web control, derived from the Web control class. <DesignerAttribute(GetType(DerivedControlDesigner), GetType(IDesigner))> _ Public Class DerivedControl Inherits WebControl ' Define derived control behavior here. End Class End Namespace
using System; using System.Web.UI; using System.Web.UI.Design; using System.Web.UI.WebControls; using System.Web.UI.Design.WebControls; using System.ComponentModel; using System.ComponentModel.Design; namespace Examples.AspNet { // Define a simple control designer that adds a // template group to the template group collection. class DerivedControlDesigner : System.Web.UI.Design.ControlDesigner { private DerivedControl internalControl = null; private const String templateGroupName = "My template group"; private const String templateDefinitionName1 = "First"; private const String templateDefinitionName2 = "Second"; private TemplateGroup internalGroup = null; // Override the read-only TemplateGroups property. // Get the base group collection, and add a group // with two template definitions for the derived // control designer. public override TemplateGroupCollection TemplateGroups { get { // Start with the groups defined by the base designer class. TemplateGroupCollection groups = base.TemplateGroups; if (internalGroup == null) { // Define a new group with two template definitions. internalGroup = new TemplateGroup(templateGroupName, internalControl.ControlStyle); TemplateDefinition templateDef1 = new TemplateDefinition(this, templateDefinitionName1, internalControl, templateDefinitionName1, internalControl.ControlStyle); TemplateDefinition templateDef2 = new TemplateDefinition(this, templateDefinitionName2, internalControl, templateDefinitionName2, internalControl.ControlStyle); internalGroup.AddTemplateDefinition(templateDef1); internalGroup.AddTemplateDefinition(templateDef2); } // Add the new template group to the collection. groups.Add(internalGroup); return groups; } } } // Define a simple web control, and associate it with the designer. [DesignerAttribute(typeof(DerivedControlDesigner), typeof(IDesigner))] public class DerivedControl : WebControl { // Define derived control behavior here. } }

System.Web.UI.Design.TemplateGroupCollection


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


TemplateGroupCollection コンストラクタ
アセンブリ: System.Design (system.design.dll 内)


TemplateGroupCollection コンストラクタを使用して、空のコレクションを作成します。Add メソッド、AddRange メソッド、または Insert メソッドを使用して、コレクションに項目を追加できます。


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


TemplateGroupCollection プロパティ

名前 | 説明 | |
---|---|---|
![]() | Count | コレクション内の TemplateGroup オブジェクト数を取得します。 |
![]() | Item | コレクション内の指定したインデックス位置にある TemplateGroup オブジェクトを取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.ICollection.Count | このメンバの説明については、Count のトピックを参照してください。 |
![]() | System.Collections.ICollection.IsSynchronized | このメンバの説明については、IsSynchronized のトピックを参照してください。 |
![]() | System.Collections.ICollection.SyncRoot | このメンバの説明については、SyncRoot のトピックを参照してください。 |
![]() | System.Collections.IList.IsFixedSize | このメンバの説明については、IsFixedSize のトピックを参照してください。 |
![]() | System.Collections.IList.IsReadOnly | このメンバの説明については、IsReadOnly のトピックを参照してください。 |
![]() | System.Collections.IList.Item | このメンバの詳細については、IList クラスのトピックを参照してください。 |

TemplateGroupCollection メソッド

名前 | 説明 | |
---|---|---|
![]() | Add | 指定した TemplateGroup オブジェクトをコレクションの末尾に追加します。 |
![]() | AddRange | 既存の TemplateGroupCollection オブジェクト内のテンプレート グループを現在の TemplateGroupCollection オブジェクトに追加します。 |
![]() | Clear | コレクションからすべてのグループを削除します。 |
![]() | Contains | 指定したグループがコレクション内に存在するかどうかを確認します。 |
![]() | CopyTo | コピー先配列の指定されたインデックスを開始位置として、コレクション内のグループを互換性がある 1 次元配列にコピーします。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | IndexOf | コレクション内の指定した TemplateGroup オブジェクトのインデックスを返します。 |
![]() | Insert | コレクション内の指定したインデックス位置に、TemplateGroup オブジェクトを挿入します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | Remove | 指定した TemplateGroup オブジェクトをコレクションから削除します。 |
![]() | RemoveAt | コレクション内の指定したインデックス位置にある TemplateGroup オブジェクトを削除します。 |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.ICollection.CopyTo | このメンバの説明については、CopyTo のトピックを参照してください。 |
![]() | System.Collections.IEnumerable.GetEnumerator | このメンバの説明については、GetEnumerator のトピックを参照してください。 |
![]() | System.Collections.IList.Add | このメンバの説明については、Add のトピックを参照してください。 |
![]() | System.Collections.IList.Clear | このメンバの説明については、Clear のトピックを参照してください。 |
![]() | System.Collections.IList.Contains | このメンバの説明については、Contains のトピックを参照してください。 |
![]() | System.Collections.IList.IndexOf | このメンバの説明については、IndexOf のトピックを参照してください。 |
![]() | System.Collections.IList.Insert | このメンバの説明については、Insert のトピックを参照してください。 |
![]() | System.Collections.IList.Remove | このメンバの説明については、Remove のトピックを参照してください。 |
![]() | System.Collections.IList.RemoveAt | このメンバの説明については、RemoveAt のトピックを参照してください。 |

TemplateGroupCollection メンバ
コントロール デザイナ内の TemplateGroup オブジェクトのコレクションを表します。このクラスは継承できません。
TemplateGroupCollection データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Count | コレクション内の TemplateGroup オブジェクト数を取得します。 |
![]() | Item | コレクション内の指定したインデックス位置にある TemplateGroup オブジェクトを取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | Add | 指定した TemplateGroup オブジェクトをコレクションの末尾に追加します。 |
![]() | AddRange | 既存の TemplateGroupCollection オブジェクト内のテンプレート グループを現在の TemplateGroupCollection オブジェクトに追加します。 |
![]() | Clear | コレクションからすべてのグループを削除します。 |
![]() | Contains | 指定したグループがコレクション内に存在するかどうかを確認します。 |
![]() | CopyTo | コピー先配列の指定されたインデックスを開始位置として、コレクション内のグループを互換性がある 1 次元配列にコピーします。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | IndexOf | コレクション内の指定した TemplateGroup オブジェクトのインデックスを返します。 |
![]() | Insert | コレクション内の指定したインデックス位置に、TemplateGroup オブジェクトを挿入します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | Remove | 指定した TemplateGroup オブジェクトをコレクションから削除します。 |
![]() | RemoveAt | コレクション内の指定したインデックス位置にある TemplateGroup オブジェクトを削除します。 |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.ICollection.CopyTo | このメンバの説明については、CopyTo のトピックを参照してください。 |
![]() | System.Collections.IEnumerable.GetEnumerator | このメンバの説明については、GetEnumerator のトピックを参照してください。 |
![]() | System.Collections.IList.Add | このメンバの説明については、Add のトピックを参照してください。 |
![]() | System.Collections.IList.Clear | このメンバの説明については、Clear のトピックを参照してください。 |
![]() | System.Collections.IList.Contains | このメンバの説明については、Contains のトピックを参照してください。 |
![]() | System.Collections.IList.IndexOf | このメンバの説明については、IndexOf のトピックを参照してください。 |
![]() | System.Collections.IList.Insert | このメンバの説明については、Insert のトピックを参照してください。 |
![]() | System.Collections.IList.Remove | このメンバの説明については、Remove のトピックを参照してください。 |
![]() | System.Collections.IList.RemoveAt | このメンバの説明については、RemoveAt のトピックを参照してください。 |
![]() | System.Collections.ICollection.Count | このメンバの説明については、Count のトピックを参照してください。 |
![]() | System.Collections.ICollection.IsSynchronized | このメンバの説明については、IsSynchronized のトピックを参照してください。 |
![]() | System.Collections.ICollection.SyncRoot | このメンバの説明については、SyncRoot のトピックを参照してください。 |
![]() | System.Collections.IList.IsFixedSize | このメンバの説明については、IsFixedSize のトピックを参照してください。 |
![]() | System.Collections.IList.IsReadOnly | このメンバの説明については、IsReadOnly のトピックを参照してください。 |
![]() | System.Collections.IList.Item | このメンバの詳細については、IList クラスのトピックを参照してください。 |

Weblioに収録されているすべての辞書からTemplateGroupCollectionを検索する場合は、下記のリンクをクリックしてください。

- TemplateGroupCollectionのページへのリンク