-api-id | -api-type |
---|---|
M:Windows.ApplicationModel.Resources.ResourceLoader.GetString(System.String) |
winrt method |
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).
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".
The most appropriate string value of the specified resource for the default ResourceContext.
See the example in ResourceLoader.