EmptyResourceDictionary.GetStringResourceAsync Method

Definition

Gets a localized string.

public System.Threading.Tasks.ValueTask<string> GetStringResourceAsync (System.Globalization.CultureInfo culture, string resourceId, System.Threading.CancellationToken cancellationToken);
abstract member GetStringResourceAsync : System.Globalization.CultureInfo * string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<string>
override this.GetStringResourceAsync : System.Globalization.CultureInfo * string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<string>
Public Function GetStringResourceAsync (culture As CultureInfo, resourceId As String, cancellationToken As CancellationToken) As ValueTask(Of String)

Parameters

culture
CultureInfo

The culture for which a string is required.

resourceId
String

The name of the resource to acquire.

cancellationToken
CancellationToken

A cancellation token.

Returns

The localized string, which may be from the default culture rather than the desired culture if no translation of the identified resource is available in the desired culture.

Implements

Applies to