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} マークアップ拡張の既定のキー マークアップ拡張引数から取得され、その他の入力パラメーターは、使用が適用されるプロパティなどのコンテキストから取得されます。

適用対象