-api-id | -api-type |
---|---|
M:Windows.ApplicationModel.Resources.ResourceLoader.#ctor(System.String) |
winrt method |
Note
ResourceLoader(String) may be altered or unavailable for releases after Windows 8.1. Instead, use GetForCurrentView(String).
Constructs a new ResourceLoader object for the specified ResourceMap.
Equivalent WinUI 2 API for UWP: ResourceLoader(String) (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
The resource identifier of the ResourceMap that the new resource loader uses for unqualified resource references. It can then retrieve resources relative to those references.
Note
The resource identifier is treated as a Uniform Resource Identifier (URI) fragment, subject to Uniform Resource Identifier (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".
This constructor is typically used to access resources relative to a resource file with the specified resource identifier. For example, new ResourceLoader('Errors');
is relative to errors.resjson or errors.resw.