BindingManagerBase.GetItemProperties 메서드

정의

데이터 원본의 속성 설명자 목록을 가져옵니다.

오버로드

Name Description
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

반품

바인딩의 속성 설명자를 나타내는 A PropertyDescriptorCollection 입니다.

예제

다음 코드 예제에서는 메서드를 GetItemPropertiesPropertyDescriptorCollection사용하여 . 다음은 현재 메서드를 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);
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 테이블의 바인딩된 속성을 포함하는 형식입니다.

반품

바인딩의 속성 설명자를 나타내는 A 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);
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 테이블의 바인딩된 속성을 포함하는 형식입니다.

반품

바인딩의 속성 설명자를 나타내는 A PropertyDescriptorCollection 입니다.

예제

다음 코드 예제에서는 메서드를 GetItemProperties 사용하여 에 대한 값을 반환 PropertyDescriptorCollection 합니다 BindingManagerBase. 그런 다음 컬렉션의 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

설명

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

추가 정보

적용 대상