Share via


IXRResourceDictionary::Add (Compact 2013)

3/28/2014

This method adds an item to the resource dictionary.

Syntax

virtual HRESULT STDMETHODCALLTYPE Add(
    __in const WCHAR* pKey, 
    __in IXRDependencyObject* pObject
) = 0;

Parameters

  • pKey
    [in] Key of the item to add.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

When you use this method to add a resource to a UI object, the object type in pObject is usually an IXRControlTemplate object or an IXRStoryboard object.

After calling this method, you can use pKey with the IXRResourceDictionary::GetItem method to retrieve a particular resource by key name.

.NET Framework Equivalent

System.Windows.ResourceDictionary.Add

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRResourceDictionary
IXRApplication::LoadResourceDictionary
IXRApplication::GetResourceDictionary