Udostępnij za pośrednictwem


NamedResource.Resolve Method

Definition

Overloads

Resolve()

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

Note

Resolve may be altered or unavailable for releases after Windows 8.1. Instead, use Resolve(ResourceContext).

Resolve(ResourceContext)

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

Resolve()

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

Note

Resolve may be altered or unavailable for releases after Windows 8.1. Instead, use Resolve(ResourceContext).

public:
 virtual ResourceCandidate ^ Resolve() = Resolve;
/// [Windows.Foundation.Metadata.Deprecated("Resolve may be altered or unavailable for releases after Windows 8.1. Instead, use Resolve(ResourceContext).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Overload("Resolve")]
ResourceCandidate Resolve();
/// [Windows.Foundation.Metadata.Overload("Resolve")]
/// [Windows.Foundation.Metadata.Deprecated("Resolve may be altered or unavailable for releases after Windows 8.1. Instead, use Resolve(ResourceContext).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
ResourceCandidate Resolve();
/// [Windows.Foundation.Metadata.Overload("Resolve")]
ResourceCandidate Resolve();
[Windows.Foundation.Metadata.Deprecated("Resolve may be altered or unavailable for releases after Windows 8.1. Instead, use Resolve(ResourceContext).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Overload("Resolve")]
public ResourceCandidate Resolve();
[Windows.Foundation.Metadata.Overload("Resolve")]
[Windows.Foundation.Metadata.Deprecated("Resolve may be altered or unavailable for releases after Windows 8.1. Instead, use Resolve(ResourceContext).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public ResourceCandidate Resolve();
[Windows.Foundation.Metadata.Overload("Resolve")]
public ResourceCandidate Resolve();
function resolve()
Public Function Resolve () As ResourceCandidate

Returns

The most appropriate candidate for the default context.

Attributes

See also

Applies to

Resolve(ResourceContext)

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

public:
 virtual ResourceCandidate ^ Resolve(ResourceContext ^ resourceContext) = Resolve;
/// [Windows.Foundation.Metadata.Overload("ResolveForContext")]
ResourceCandidate Resolve(ResourceContext const& resourceContext);
[Windows.Foundation.Metadata.Overload("ResolveForContext")]
public ResourceCandidate Resolve(ResourceContext resourceContext);
function resolve(resourceContext)
Public Function Resolve (resourceContext As ResourceContext) As ResourceCandidate

Parameters

resourceContext
ResourceContext

The context against which the NamedResource should be resolved.

Returns

The most appropriate candidate for the specified context.

Attributes

Remarks

The resource management system for UWP 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.

See also

Applies to