CustomXamlResourceLoader.GetResource(String, String, String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, specifies the logic of resource lookup for this CustomXamlResourceLoader. Given a resource ID and some type information about the expected result, returns the requested resource.
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
Parameters
- resourceId
-
String
Platform::String
winrt::hstring
The string-form key of the resource to get.
- objectType
-
String
Platform::String
winrt::hstring
The expected type of the resource.
- propertyName
-
String
Platform::String
winrt::hstring
The name of the property that serves as the key in the custom resource lookup logic.
- propertyType
-
String
Platform::String
winrt::hstring
The type of the property that serves as the key, with type represented as a string.
Returns
The retrieved resource.
Remarks
This method will be called by the Windows Runtime XAML parser whenever it encounters a {CustomResource} markup extension usage in markup. The resourceId comes from the default key markup extension argument to {CustomResource} markup extension, and the other input parameters come from context, such as which property the usage is applied to.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기