Skip to main content
ResourceLoader.GetForViewIndependentUse(String) | getForViewIndependentUse(String) method

Gets a ResourceLoader object for the specified ResourceMap. This ResourceLoader uses a default context that's not associated with any view.

Syntax


var resourceLoader = Windows.ApplicationModel.Resources.ResourceLoader.getForViewIndependentUse(name);

public static ResourceLoader GetForViewIndependentUse(
  string name
)

Public Shared Function GetForViewIndependentUse(
  name As String 
) As ResourceLoader

public:
static ResourceLoader^ GetForViewIndependentUse(
  String^ name
)

Parameters

name

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The resource identifier of the ResourceMap that the new resource loader uses for unqualified resource references. The loader can then retrieve resources relative to those references.

Note  The resource identifier is treated as a URI fragment, subject to URI semantics. For example, "Caption%20" is treated as "Caption ". Do not use "?" or "#" in resource identifiers, as they terminate the named resource path. For example, "Foo?3" is treated as "Foo".
 

Return value

Type: ResourceLoader

A resource loader for the Resources subtree of the currently running app's main ResourceMap. This ResourceLoader uses a default context that's not associated with any view. You can't use this ResourceLoader to retrieve any resource that has resource candidates qualified for scale.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel.Resources
Windows::ApplicationModel::Resources [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.ApplicationModel.Resources
Windows::ApplicationModel::Resources [C++]

Metadata

Windows.winmd

See also

ResourceLoader
GetForViewIndependentUse