CustomXamlResourceLoader.GetResource(String, String, String, String) 메서드

정의

파생 클래스에서 재정의되는 경우 이 CustomXamlResourceLoader에 대한 리소스 조회 논리를 지정합니다. 리소스 ID와 예상된 결과에 대한 일부 형식 정보를 지정하면 요청된 리소스를 반환합니다.

protected:
 virtual Platform::Object ^ GetResource(Platform::String ^ resourceId, Platform::String ^ objectType, Platform::String ^ propertyName, Platform::String ^ propertyType) = GetResource;
IInspectable GetResource(winrt::hstring const& resourceId, winrt::hstring const& objectType, winrt::hstring const& propertyName, winrt::hstring const& propertyType);
protected virtual object GetResource(string resourceId, string objectType, string propertyName, string propertyType);
function getResource(resourceId, objectType, propertyName, propertyType)
Protected Overridable Function GetResource (resourceId As String, objectType As String, propertyName As String, propertyType As String) As Object

매개 변수

resourceId
String

Platform::String

winrt::hstring

가져올 리소스의 문자열 형식 키입니다.

objectType
String

Platform::String

winrt::hstring

예상된 리소스 형식입니다.

propertyName
String

Platform::String

winrt::hstring

사용자 지정 리소스 조회 논리에서 키 역할을 하는 속성의 이름입니다.

propertyType
String

Platform::String

winrt::hstring

키 역할을 하는 속성의 형식으로, 형식이 문자열로 표시됩니다.

반환

Object

Platform::Object

IInspectable

검색된 리소스입니다.

설명

이 메서드는 태그에서 {CustomResource} 태그 확장 사용이 발생할 때마다 Windows 런타임 XAML 파서에서 호출됩니다. resourceId는 기본 태그 확장 인수에서 {CustomResource} 태그 확장으로 제공되며, 다른 입력 매개 변수는 사용이 적용되는 속성과 같은 컨텍스트에서 제공됩니다.

적용 대상