Partager via


IXRResourceDictionary::Add (Windows Embedded CE 6.0)

1/6/2010

This method adds an item to the resource dictionary.

Syntax

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

Parameters

  • pKey
    [in] The 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 pValue is usually an IXRControlTemplate object or an IXRStoryboard object.

By calling this method instead of the inherited IXRCollection<In_T, Out_T>::Add method, you can supply a key that can be later specified to retrieve a particular resource by key name, by using the IXRResourceDictionary::GetItem method.

.NET Framework Equivalent

System.Windows.ResourceDictionary.Add

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRResourceDictionary