ResourceMap.GetValue 메서드

정의

오버로드

GetValue(String)

참고

GetValue(String)는 Windows 8.1 후 릴리스에서 변경되거나 사용할 수 없습니다. 대신 GetValue(String, ResourceContext)를 사용합니다.

기본 컨텍스트 내에서 리소스 식별자에 의해 지정된 리소스에 가장 적합한 후보를 반환합니다.

GetValue(String, ResourceContext)

제공된 컨텍스트에 대한 리소스 식별자에 의해 지정된 리소스에 가장 적합한 후보를 반환합니다.

GetValue(String)

참고

GetValue(String)는 Windows 8.1 후 릴리스에서 변경되거나 사용할 수 없습니다. 대신 GetValue(String, ResourceContext)를 사용합니다.

기본 컨텍스트 내에서 리소스 식별자에 의해 지정된 리소스에 가장 적합한 후보를 반환합니다.

public:
 virtual ResourceCandidate ^ GetValue(Platform::String ^ resource) = GetValue;
/// [Windows.Foundation.Metadata.Deprecated("GetValue(string) may be altered or unavailable for releases after Windows 8.1. Instead, use GetValue(string, ResourceContext).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Overload("GetValue")]
ResourceCandidate GetValue(winrt::hstring const& resource);
/// [Windows.Foundation.Metadata.Overload("GetValue")]
/// [Windows.Foundation.Metadata.Deprecated("GetValue(string) may be altered or unavailable for releases after Windows 8.1. Instead, use GetValue(string, ResourceContext).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
ResourceCandidate GetValue(winrt::hstring const& resource);
/// [Windows.Foundation.Metadata.Overload("GetValue")]
ResourceCandidate GetValue(winrt::hstring const& resource);
[Windows.Foundation.Metadata.Deprecated("GetValue(string) may be altered or unavailable for releases after Windows 8.1. Instead, use GetValue(string, ResourceContext).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Overload("GetValue")]
public ResourceCandidate GetValue(string resource);
[Windows.Foundation.Metadata.Overload("GetValue")]
[Windows.Foundation.Metadata.Deprecated("GetValue(string) may be altered or unavailable for releases after Windows 8.1. Instead, use GetValue(string, ResourceContext).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public ResourceCandidate GetValue(string resource);
[Windows.Foundation.Metadata.Overload("GetValue")]
public ResourceCandidate GetValue(string resource);
function getValue(resource)
Public Function GetValue (resource As String) As ResourceCandidate

매개 변수

resource
String

Platform::String

winrt::hstring

이름 또는 참조로 지정된 리소스 식별자입니다. 자세한 내용은 ResourceMap 클래스에 대한 설명을 참조하세요.

반환

가장 적합한 후보를 설명하는 ResourceCandidate 입니다.

특성

추가 정보

적용 대상

GetValue(String, ResourceContext)

제공된 컨텍스트에 대한 리소스 식별자에 의해 지정된 리소스에 가장 적합한 후보를 반환합니다.

public:
 virtual ResourceCandidate ^ GetValue(Platform::String ^ resource, ResourceContext ^ context) = GetValue;
/// [Windows.Foundation.Metadata.Overload("GetValueForContext")]
ResourceCandidate GetValue(winrt::hstring const& resource, ResourceContext const& context);
[Windows.Foundation.Metadata.Overload("GetValueForContext")]
public ResourceCandidate GetValue(string resource, ResourceContext context);
function getValue(resource, context)
Public Function GetValue (resource As String, context As ResourceContext) As ResourceCandidate

매개 변수

resource
String

Platform::String

winrt::hstring

이름 또는 참조로 지정된 리소스입니다. 자세한 내용은 ResourceMap 클래스에 대한 설명을 참조하세요.

context
ResourceContext

가장 적합한 후보를 선택할 컨텍스트입니다.

반환

가장 적합한 후보를 설명하는 ResourceCandidate 입니다.

특성

설명

일부 리소스는 표시될 보기의 규모에 따라 로드되며, 앱 내의 다른 보기는 다른 배율을 가진 다른 디바이스에 표시될 수 있습니다. 눈금은 보기별 특성입니다.

GetValue 메서드는 런타임 컨텍스트와 관련하여 지정된 리소스에 가장 적합한 후보를 선택하므로 ResourceContext 의 크기 조정 한정자는 연결된 보기에 따라 달라지으므로 리소스가 사용될 뷰에서 가져온 ResourceContext 개체를 사용하여 GetValue를 항상 호출해야 합니다. ResourceContext.GetForCurrentView를 호출하여 적절한 ResourceContext를 검색합니다.

추가 정보

적용 대상