System.ComponentModel.ICustomTypeDescriptor.GetPropertyOwner Method

Returns an object that contains the property described by the specified property descriptor.

Syntax

public object GetPropertyOwner (PropertyDescriptor pd)

Parameters

pd
A System.ComponentModel.PropertyDescriptor that represents the property whose owner is to be found.

Returns

An object that represents the owner of the specified property.

Remarks

The ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor) method retrieves the object that contains the property member that is described by System.ComponentModel.PropertyDescriptor parameter. Typically, this object is required for the PropertyDescriptor.GetValue(object) and PropertyDescriptor.SetValue(object, object) methods.

This method should return an object that you can use as follows:

Example

 pd.GetValue(GetPropertyOwner(myPd));

If myPd is null, your implementation of the System.ComponentModel.ICustomTypeDescriptor interface should return the default object (typically, the base object that exposes the properties and attributes).

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0