영어로 읽기

다음을 통해 공유


IVisualTreeService2::GetPropertyIndex method

Gets the property index for the specified property name.

Syntax

c++
virtual HRESULT GetPropertyIndex(
  [in]  InstanceHandle object,
  [in]  LPCWSTR        propertyName,
  [out] unsigned int   *pPropertyIndex
) = 0;

Parameters

  • 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.

Return value

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.

 

Remarks

This index can be passed to the GetProperty method in order to retrieve a specific property on an object.

See also

IVisualTreeService2