Share via


IXRApplication::LoadResourceDictionary (Compact 2013)

3/28/2014

This method parses the specified XAML file that contains the resources that belong to the application.

Syntax

virtual HRESULT STDMETHODCALLTYPE LoadResourceDictionary(
    XRXamlSource* pSource,
    IXRResourceDictionary** ppDictionary
) = 0;

Parameters

  • pSource
    [in] Pointer to an XRXamlSource structure that describes the XAML source to parse.
  • ppDictionary
    [out] Pointer to an IXRResourceDictionary pointer that represents the XAML for Windows Embedded object that the method created from parsing the XAML.

    This parameter is optional.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

This method is used to parse a XAML file that includes application resources that must be parsed into a resource dictionary. Parse the application resource XAML file before you call IXRApplication::ParseXaml to parse other XAML files.

If you use Blend for Visual Studio to generate the XAML files for your application, the name of the generated XAML file that includes application resources is Application.xaml. This file should only be parsed by using LoadResourceDictionary, and not by using ParseXaml.

The following code shows an example of XAML markup that must be parsed into a resource dictionary:

Important

For readability, the following code example does not contain security checking or error handling. Do not use the following code in a production environment.

<Application.Resources>
    <SolidColorBrush x:Key="Text_DefaultColor" Color="#FF292F33"/>
</Application.Resources>

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRApplication
IXRApplication::GetResourceDictionary