この BindingManagerBase によって管理されている項目のプロパティのリストを取得します。
Overloads Protected Overridable Function GetItemProperties( _
ByVal listType As Type, _ ByVal offset As Integer, _ ByVal dataSources As ArrayList, _ ByVal listAccessors As ArrayList _) As PropertyDescriptorCollection
[C#]
protected virtual PropertyDescriptorCollection GetItemProperties(TypelistType,intoffset,ArrayListdataSources,ArrayListlistAccessors);
[C++]
protected: virtual PropertyDescriptorCollection* GetItemProperties(Type* listType,intoffset,ArrayList* dataSources,ArrayList* listAccessors);
[JScript]
protected function GetItemProperties(
listType : Type,offset : int,dataSources : ArrayList,listAccessors : ArrayList) : PropertyDescriptorCollection;
パラメータ
- listType
バインドされたリストの Type 。 - offset
メソッドの再帰的な呼び出しに使用するカウンタ。 - dataSources
データ ソースを格納している ArrayList 。 - listAccessors
テーブルのバインドされたプロパティを格納している ArrayList 。
戻り値
バインディングのプロパティ記述子を表す PropertyDescriptorCollection 。
解説
このオーバーロードは、データ連結コントロールを作成する開発者が使用します。
使用例
[Visual Basic, C#, C++] GetItemProperties メソッドを使用して、 BindingManagerBase の PropertyDescriptorCollection オブジェクトを返す例を次に示します。さらに、この例ではコレクションの各 PropertyDescriptor の、 Name および PropertyType を出力します。
Private Sub PrintPropertyDescriptions(b As BindingManagerBase)
Console.WriteLine("Printing Property Descriptions")
Dim ps As PropertyDescriptorCollection = b.GetItemProperties()
Dim i As Integer
For i = 0 To ps.Count - 1
Console.WriteLine((ControlChars.Tab & ps(i).Name & ControlChars.Tab & ps(i).PropertyType.ToString))
Next i
End Sub 'PrintPropertyDescriptions
[C#]
private void PrintPropertyDescriptions(BindingManagerBase b)
{
Console.WriteLine("Printing Property Descriptions");
PropertyDescriptorCollection ps = b.GetItemProperties();
for(int i = 0; i < ps.Count; i++)
{
Console.WriteLine("\t" + ps[i].Name + "\t" + ps[i].PropertyType);
}
}
[C++]
private:
void PrintPropertyDescriptions(BindingManagerBase* b)
{
Console::WriteLine(S"Printing Property Descriptions");
PropertyDescriptorCollection* ps = b->GetItemProperties();
for(int i = 0; i < ps->Count; i++)
{
Console::WriteLine(S"\t{0}\t{1}", ps->Item[i]->Name, ps->Item[i]->PropertyType);
}
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET
参照
BindingManagerBase クラス | BindingManagerBase メンバ | System.Windows.Forms 名前空間 | BindingManagerBase.GetItemProperties オーバーロードの一覧