ITypedList.GetItemProperties(PropertyDescriptor[]) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
PropertyDescriptorCollection 데이터를 바인딩하는 데 사용되는 각 항목의 속성을 나타내는 값을 반환합니다.
public:
System::ComponentModel::PropertyDescriptorCollection ^ GetItemProperties(cli::array <System::ComponentModel::PropertyDescriptor ^> ^ listAccessors);
public System.ComponentModel.PropertyDescriptorCollection GetItemProperties(System.ComponentModel.PropertyDescriptor[]? listAccessors);
public System.ComponentModel.PropertyDescriptorCollection GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors);
abstract member GetItemProperties : System.ComponentModel.PropertyDescriptor[] -> System.ComponentModel.PropertyDescriptorCollection
Public Function GetItemProperties (listAccessors As PropertyDescriptor()) As PropertyDescriptorCollection
매개 변수
- listAccessors
- PropertyDescriptor[]
컬렉션에서 바인딩 가능한 개체로 찾을 개체의 PropertyDescriptor 배열입니다. 이 매개 변수는 null이 될 수 있습니다.
반품
PropertyDescriptorCollection 데이터를 바인딩하는 데 사용되는 각 항목의 속성을 나타내는 값입니다.
예제
다음 코드 예제에서는 메서드를 구현 하는 방법을 보여 줍니다 GetItemProperties . 전체 코드 목록은 방법: ITypedList 인터페이스 구현을 참조하세요.
public PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors)
{
PropertyDescriptorCollection pdc;
if (listAccessors != null && listAccessors.Length > 0)
{
// Return child list shape.
pdc = ListBindingHelper.GetListItemProperties(listAccessors[0].PropertyType);
}
else
{
// Return properties in sort order.
pdc = properties;
}
return pdc;
}
Public Function GetItemProperties(ByVal listAccessors() As System.ComponentModel.PropertyDescriptor) As System.ComponentModel.PropertyDescriptorCollection Implements System.ComponentModel.ITypedList.GetItemProperties
Dim pdc As PropertyDescriptorCollection
If (Not (listAccessors Is Nothing)) And (listAccessors.Length > 0) Then
' Return child list shape
pdc = ListBindingHelper.GetListItemProperties(listAccessors(0).PropertyType)
Else
' Return properties in sort order
pdc = properties
End If
Return pdc
End Function
설명
매개 변수가 listAccessors 아닌 null경우 일반적으로 구현하는 개체에 대해 검색할 컨테이너 목록을 식별하는 속성 설명자가 포함됩니다 ITypedList. 예를 들어 DataSet 두 테이블 myCustomers 이 포함된 테이블과 myOrders테이블 간의 관계가 호출 myCustOrders되는 경우를 들 수 있습니다. 볼 개체를 DataView 만드는 경우 메서드를 호출하면 열에 myCustomersGetItemProperties 대한 속성 설명자가 반환됩니다null.myCustomers 결과적으로 반환된 속성 설명자 중 하나는 속성 설명자가 포함된 myCustOrders 목록 접근자 GetItemProperties배열을 사용하여 메서드를 호출 myCustOrders 하면 속성 설명자가 반환되는 것처럼 속성 설명자입니다myOrders.
적용 대상
추가 정보
- BindingList<T>
- 방법: ITypedList 인터페이스 구현
- Windows Forms 데이터 바인딩