BindingManagerBase.GetItemProperties 메서드

정의

데이터 소스에 대한 속성 설명자의 목록을 가져옵니다.

오버로드

GetItemProperties()

파생 클래스에서 재정의하는 경우 바인딩에 대한 속성 설명자의 컬렉션을 가져오거나 설정합니다.

GetItemProperties(ArrayList, ArrayList)

지정된 ArrayList를 사용하여 바인딩에 대한 속성 설명자의 컬렉션을 가져옵니다.

GetItemProperties(Type, Int32, ArrayList, ArrayList)

BindingManagerBase가 관리하는 항목의 속성 목록을 가져옵니다.

GetItemProperties()

파생 클래스에서 재정의하는 경우 바인딩에 대한 속성 설명자의 컬렉션을 가져오거나 설정합니다.

public:
 abstract System::ComponentModel::PropertyDescriptorCollection ^ GetItemProperties();
public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ GetItemProperties();
public abstract System.ComponentModel.PropertyDescriptorCollection GetItemProperties ();
public virtual System.ComponentModel.PropertyDescriptorCollection GetItemProperties ();
abstract member GetItemProperties : unit -> System.ComponentModel.PropertyDescriptorCollection
abstract member GetItemProperties : unit -> System.ComponentModel.PropertyDescriptorCollection
override this.GetItemProperties : unit -> System.ComponentModel.PropertyDescriptorCollection
Public MustOverride Function GetItemProperties () As PropertyDescriptorCollection
Public Overridable Function GetItemProperties () As PropertyDescriptorCollection

반환

PropertyDescriptorCollection

바인딩에 대한 속성 설명자를 나타내는 PropertyDescriptorCollection입니다.

예제

다음 코드 예제에서는 메서드를 GetItemProperties PropertyDescriptorCollection사용하여 . 다음은 현재 메서드를 Name 사용하여 현재 DataColumn 값과 값을 인쇄하는 GetValue 예제입니다 PropertyDescriptor.

void ShowGetItemProperties()
{
   
   // Create a new DataTable and add two columns.
   DataTable^ dt = gcnew DataTable;
   dt->Columns->Add( "Name", Type::GetType( "System.String" ) );
   dt->Columns->Add( "ID", Type::GetType( "System.String" ) );
   
   // Add a row to the table.
   DataRow^ dr = dt->NewRow();
   dr[ "Name" ] = "Ann";
   dr[ "ID" ] = "AAA";
   dt->Rows->Add( dr );
   PropertyDescriptorCollection^ myPropertyDescriptors = this->BindingContext[ dt ]->GetItemProperties();
   PropertyDescriptor^ myPropertyDescriptor = myPropertyDescriptors[ "Name" ];
   Console::WriteLine( myPropertyDescriptor->Name );
   Console::WriteLine( myPropertyDescriptor->GetValue( dt->DefaultView[ 0 ] ) );
}
private void ShowGetItemProperties()
{
   // Create a new DataTable and add two columns.
   DataTable dt = new DataTable();
   dt.Columns.Add("Name", Type.GetType("System.String"));
   dt.Columns.Add("ID", Type.GetType("System.String"));
   // Add a row to the table.
   DataRow dr = dt.NewRow();
   dr["Name"] = "Ann";
   dr["ID"] = "AAA";
   dt.Rows.Add(dr);

   PropertyDescriptorCollection myPropertyDescriptors = 
   this.BindingContext[dt].GetItemProperties();
   PropertyDescriptor myPropertyDescriptor = 
   myPropertyDescriptors["Name"];
   Console.WriteLine(myPropertyDescriptor.Name);
   Console.WriteLine(myPropertyDescriptor.GetValue
   (dt.DefaultView[0]));
}
Private Sub ShowGetItemProperties()
   ' Create a new DataTable and add two columns.
   Dim dt As New DataTable()
   dt.Columns.Add("Name", Type.GetType("System.String"))
   dt.Columns.Add("ID", Type.GetType("System.String"))
   ' Add a row to the table.
   Dim dr As DataRow = dt.NewRow()
   dr("Name") = "Ann"
   dr("ID") = "AAA"
   dt.Rows.Add(dr)
     
   Dim myPropertyDescriptors As PropertyDescriptorCollection = _
   Me.BindingContext(dt).GetItemProperties()
   Dim myPropertyDescriptor As PropertyDescriptor = myPropertyDescriptors("Name")
   Console.WriteLine(myPropertyDescriptor.Name)
   Console.WriteLine(myPropertyDescriptor.GetValue(dt.DefaultView(0)))
End Sub

추가 정보

적용 대상

GetItemProperties(ArrayList, ArrayList)

지정된 ArrayList를 사용하여 바인딩에 대한 속성 설명자의 컬렉션을 가져옵니다.

protected public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ GetItemProperties(System::Collections::ArrayList ^ dataSources, System::Collections::ArrayList ^ listAccessors);
protected internal virtual System.ComponentModel.PropertyDescriptorCollection GetItemProperties (System.Collections.ArrayList dataSources, System.Collections.ArrayList listAccessors);
protected internal virtual System.ComponentModel.PropertyDescriptorCollection? GetItemProperties (System.Collections.ArrayList dataSources, System.Collections.ArrayList listAccessors);
abstract member GetItemProperties : System.Collections.ArrayList * System.Collections.ArrayList -> System.ComponentModel.PropertyDescriptorCollection
override this.GetItemProperties : System.Collections.ArrayList * System.Collections.ArrayList -> System.ComponentModel.PropertyDescriptorCollection
Protected Friend Overridable Function GetItemProperties (dataSources As ArrayList, listAccessors As ArrayList) As PropertyDescriptorCollection

매개 변수

dataSources
ArrayList

데이터 소스가 들어 있는 ArrayList입니다.

listAccessors
ArrayList

테이블의 바인딩된 속성이 포함된 ArrayList 입니다.

반환

PropertyDescriptorCollection

바인딩에 대한 속성 설명자를 나타내는 PropertyDescriptorCollection입니다.

설명

이 메서드는 데이터 바인딩된 컨트롤을 만드는 개발자에 의해 사용 됩니다.

추가 정보

적용 대상

GetItemProperties(Type, Int32, ArrayList, ArrayList)

BindingManagerBase가 관리하는 항목의 속성 목록을 가져옵니다.

protected:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ GetItemProperties(Type ^ listType, int offset, System::Collections::ArrayList ^ dataSources, System::Collections::ArrayList ^ listAccessors);
protected virtual System.ComponentModel.PropertyDescriptorCollection GetItemProperties (Type listType, int offset, System.Collections.ArrayList dataSources, System.Collections.ArrayList listAccessors);
protected virtual System.ComponentModel.PropertyDescriptorCollection? GetItemProperties (Type listType, int offset, System.Collections.ArrayList dataSources, System.Collections.ArrayList listAccessors);
abstract member GetItemProperties : Type * int * System.Collections.ArrayList * System.Collections.ArrayList -> System.ComponentModel.PropertyDescriptorCollection
override this.GetItemProperties : Type * int * System.Collections.ArrayList * System.Collections.ArrayList -> System.ComponentModel.PropertyDescriptorCollection
Protected Overridable Function GetItemProperties (listType As Type, offset As Integer, dataSources As ArrayList, listAccessors As ArrayList) As PropertyDescriptorCollection

매개 변수

listType
Type

바인딩된 목록의 Type입니다.

offset
Int32

메서드를 재귀적으로 호출하는 데 사용되는 카운터입니다.

dataSources
ArrayList

데이터 소스가 들어 있는 ArrayList입니다.

listAccessors
ArrayList

테이블의 바인딩된 속성이 포함된 ArrayList 입니다.

반환

PropertyDescriptorCollection

바인딩에 대한 속성 설명자를 나타내는 PropertyDescriptorCollection입니다.

예제

다음 코드 예제에서는 메서드를 GetItemProperties 사용하여 에 대한 BindingManagerBase메서드를 PropertyDescriptorCollection 반환합니다. 그런 다음 컬렉션의 NamePropertyDescriptor 항목과 PropertyType 각 항목이 출력됩니다.

void PrintPropertyDescriptions( BindingManagerBase^ b )
{
   Console::WriteLine( "Printing Property Descriptions" );
   PropertyDescriptorCollection^ ps = b->GetItemProperties();
   for ( int i = 0; i < ps->Count; i++ )
   {
      Console::WriteLine( "\t{0}\t{1}", ps[ i ]->Name, ps[ i ]->PropertyType );

   }
}
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);
   }
}
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

설명

이 오버로드는 개발자가 데이터 바인딩된 컨트롤을 만드는 데 사용됩니다.

추가 정보

적용 대상