IVisualTreeService2::GetPropertyIndex method
Gets the property index for the specified property name.
virtual HRESULT GetPropertyIndex(
[in] InstanceHandle object,
[in] LPCWSTR propertyName,
[out] unsigned int *pPropertyIndex
) = 0;
object [in]
The dependency object to get the property index from.propertyName [in]
The name of the dependency property for which to get the index.pPropertyIndex [out]
The index of the specified property.
The possible return codes include, but are not limited to, the values shown in the following table.
Return code | Description |
---|---|
S_OK | The method succeeded. |
E_INVALIDARG | No property with propertyName was found, or the property cannot be applied to object. |
This index can be passed to the GetProperty method in order to retrieve a specific property on an object.