Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.9 KB

resourceloader_getstring_1647290392.md

File metadata and controls

38 lines (25 loc) · 1.9 KB
-api-id -api-type
M:Windows.ApplicationModel.Resources.ResourceLoader.GetString(System.String)
winrt method

Windows.ApplicationModel.Resources.ResourceLoader.GetString

-description

Returns the most appropriate string value of a resource, specified by resource identifier, for the default ResourceContext of the view in which the ResourceLoader was obtained using ResourceLoader.GetForCurrentView.

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

-parameters

-param resource

The resource identifier of the resource to be resolved.

Note

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

-returns

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

-remarks

-examples

See the example in ResourceLoader.

-see-also

ResourceContext