IVisualTreeService3::AddDictionaryItem method (xamlom.h)
Adds an item to a ResourceDictionary, and re-resolves all elements in the tree that reference a resource with the specified key.
Syntax
HRESULT AddDictionaryItem(
[in] InstanceHandle dictionaryHandle,
[in] InstanceHandle resourceKey,
[in] InstanceHandle resourceHandle
);
Parameters
[in] dictionaryHandle
The dictionary to add the resource to.
[in] resourceKey
The key of the resource to add.
[in] resourceHandle
The resource to add.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Any invalid resource references will result in the value being cleared, and IVisualTreeServiceCallback2 will be notified.
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 |