CurrencyManager.GetItemProperties Yöntem

Tanım

Temel alınan liste için özellik tanımlayıcı koleksiyonunu alır.

public:
 override System::ComponentModel::PropertyDescriptorCollection ^ GetItemProperties();
public override System.ComponentModel.PropertyDescriptorCollection GetItemProperties ();
override this.GetItemProperties : unit -> System.ComponentModel.PropertyDescriptorCollection
Public Overrides Function GetItemProperties () As PropertyDescriptorCollection

Döndürülenler

Liste için A PropertyDescriptorCollection .

Örnekler

Aşağıdaki kod örneği, GetItemProperties için bir PropertyDescriptorCollection döndürmek için BindingManagerBaseyöntemini kullanır. Örnek daha sonra koleksiyondaki Name her PropertyDescriptor birinin ve PropertyType değerlerini yazdırır.

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

Açıklamalar

PropertyDescriptorCollection için CurrencyManager değeri, listede bir sütun belirtmek için kullanılır.

Şunlara uygulanır

Ayrıca bkz.