This documentation is archived and is not being maintained.

BindingManagerBase.GetItemProperties Method

Get or sets the list of property descriptors for the data source.

Overload List

When overridden in a derived class, gets the collection of property descriptors for the binding.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public MustOverride Function GetItemProperties() As PropertyDescriptorCollection
[C#] public abstract PropertyDescriptorCollection GetItemProperties();
[C++] public: virtual PropertyDescriptorCollection* GetItemProperties() = 0;
[JScript] public abstract function GetItemProperties() : PropertyDescriptorCollection;

Gets the collection of property descriptors for the binding using the specified ArrayList.

[Visual Basic] Overloads Protected Friend Overridable Function GetItemProperties(ArrayList, ArrayList) As PropertyDescriptorCollection
[C#] protected internal virtual PropertyDescriptorCollection GetItemProperties(ArrayList, ArrayList);
[C++] protected public: virtual PropertyDescriptorCollection* GetItemProperties(ArrayList*, ArrayList*);
[JScript] protected internal function GetItemProperties(ArrayList, ArrayList) : PropertyDescriptorCollection;

Gets the list of properties of the items managed by this BindingManagerBase.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Protected Overridable Function GetItemProperties(Type, Integer, ArrayList, ArrayList) As PropertyDescriptorCollection
[C#] protected virtual PropertyDescriptorCollection GetItemProperties(Type, int, ArrayList, ArrayList);
[C++] protected: virtual PropertyDescriptorCollection* GetItemProperties(Type*, int, ArrayList*, ArrayList*);
[JScript] protected function GetItemProperties(Type, int, ArrayList, ArrayList) : PropertyDescriptorCollection;

Example

[Visual Basic, C#, C++] The following example uses the GetItemProperties method to return a PropertyDescriptorCollection object for a BindingManagerBase. The example then prints out the Name and PropertyType of each PropertyDescriptor in the collection.

[Visual Basic, C#, C++] Note   This example shows how to use one of the overloaded versions of GetItemProperties. For other examples that might be available, see the individual overload topics.
[Visual Basic] 
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] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

BindingManagerBase Class | BindingManagerBase Members | System.Windows.Forms Namespace

Show: