IVisualTreeService3::ResolveResource method (xamlom.h)
Resolves a resource for an element in the tree and applies the resource to the property provided by the specified property index.
Syntax
HRESULT ResolveResource(
[in] InstanceHandle resourceContext,
[in] LPCWSTR resourceName,
[in] ResourceType resourceType,
[in] unsigned int propertyIndex
);
Parameters
[in] resourceContext
The context of the resource.
[in] resourceName
The name of the resource.
[in] resourceType
The type of the resource.
[in] propertyIndex
The index of the property to apply the resource to.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
If no resource was found, or the resource type was invalid, IVisualTreeServiceCallback2 will be notified.
Call GetDictionaryItem to get a resourceContext and give better resolution context for ResolveResource.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1703 [desktop apps only] |
Minimum supported server | Windows Server 2016 [desktop apps only] |
Target Platform | Windows |
Header | xamlom.h |