NamedResource.Resolve(ResourceContext) | resolve(ResourceContext) method

Applies to Windows and Windows Phone

Resolves this NamedResource object against a supplied context and returns the most appropriate candidate.

Syntax


var resourceCandidate = namedResource.resolve(resourceContext);

Parameters

resourceContext

Type: ResourceContext

The context against which the NamedResource should be resolved.

Return value

Type: ResourceCandidate

The most appropriate candidate for the specified context.

Remarks

The resource management system for Windows Store apps supports the tailoring of resources for scale. Starting in Windows 8.1, different views owned by an app are able to display simultaneously on different display devices that may use different scales. In this way, scale is a per-view characteristic.

Since the Resolve method selects the best candidate for a NamedResource in relation to a runtime context, and since the scale qualifier of a ResourceContext depends on the associated view, the Resolve should always be called passing a ResourceContext object obtained from the view in which the resource will be used.

See the ResourceContext.GetForCurrentView method.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.ApplicationModel.Resources.Core
Windows::ApplicationModel::Resources::Core [C++]

Metadata

Windows.winmd

See also

NamedResource
ResourceContext
ResourceContext.GetForCurrentView

 

 

Show:
© 2014 Microsoft