Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.63 KB

resourceloader_getstringforuri_449569482.md

File metadata and controls

33 lines (22 loc) · 1.63 KB
-api-id -api-type
M:Windows.ApplicationModel.Resources.ResourceLoader.GetStringForUri(Windows.Foundation.Uri)
winrt method

Windows.ApplicationModel.Resources.ResourceLoader.GetStringForUri

-description

Returns the most appropriate string value of a resource, specified by a Uniform Resource Identifier (URI) resource identifier, for the default ResourceContext of the currently running app.

Equivalent WinUI 2 API for UWP: Microsoft.Windows.ApplicationModel.Resources.ResourceLoader.GetStringForUri (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

-parameters

-param uri

A Uniform Resource Identifier (URI) that represents the resource to be retrieved.

-returns

The most appropriate string value of the specified resource for the default ResourceContext.

-remarks

Uniform Resource Identifier (URI) objects require a scheme to be identified. In this context, the ms-resource scheme must be specified in the Uniform Resource Identifier (URI) passed to the method.

Errors

This method fails with an exception if the supplied Uniform Resource Identifier (URI) is for some other protocol, if the requested resource is not found, or if the requested resource is not a string.

-examples

-see-also