NamedResource.Resolve 方法

定义

重载

Resolve()

根据默认上下文解析此 NamedResource 对象,并返回最合适的候选项。

注意

Windows 8.1后,解析可能会更改或不可用。 请改 用 Resolve (ResourceContext)

Resolve(ResourceContext)

根据提供的上下文解析此 NamedResource 对象,并返回最合适的候选项。

Resolve()

根据默认上下文解析此 NamedResource 对象,并返回最合适的候选项。

注意

Windows 8.1后,解析可能会更改或不可用。 请改 用 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

返回

默认上下文的最合适的候选项。

属性

另请参阅

适用于

Resolve(ResourceContext)

根据提供的上下文解析此 NamedResource 对象,并返回最合适的候选项。

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

参数

resourceContext
ResourceContext

应对其解析 NamedResource 的上下文。

返回

指定上下文的最合适候选项。

属性

注解

UWP 应用的资源管理系统支持为缩放定制资源。 从Windows 8.1开始,应用拥有的不同视图能够在可能使用不同的比例的不同显示设备上同时显示。 这样,缩放是按视图的特征。

由于 Resolve 方法选择与运行时上下文相关的 NamedResource 的最佳候选项,并且 由于 ResourceContext 的缩放限定符依赖于关联的视图,因此应始终调用 Resolve,传递从将使用资源的视图获取的 ResourceContext 对象。

请参阅 ResourceContext.GetForCurrentView 方法。

另请参阅

适用于