ICustomTypeDescriptor.GetPropertyOwner Method
Returns the object that this value is a member of.
[Visual Basic] Function GetPropertyOwner( _ ByVal pd As PropertyDescriptor _ ) As Object [C#] object GetPropertyOwner( PropertyDescriptor pd ); [C++] Object* GetPropertyOwner( PropertyDescriptor* pd ); [JScript] function GetPropertyOwner( pd : PropertyDescriptor ) : Object;
Parameters
- pd
- A PropertyDescriptor that represents the property whose owner is to be found.
Return Value
An Object that represents the owner of the specified property.
Remarks
This method retrieves the object that directly depends on this value being edited. Typically, this object is required for the PropertyDescriptor.GetValue and PropertyDescriptor.SetValue methods.
This method should return an object that you can use as follows:
pd.GetValue(GetPropertyOwner(myPd));
If the myPd is a null reference (Nothing in Visual Basic), your implementation of ICustomTypeDescriptor should return the default object, typically, the base object that exposes the properties and attributes.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
See Also
ICustomTypeDescriptor Interface | ICustomTypeDescriptor Members | System.ComponentModel Namespace | ICustomTypeDescriptor | TypeDescriptor | PropertyDescriptor