CustomXamlResourceLoader.GetResource(String, String, String, String) Method

Definition

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.

C#
protected virtual object GetResource(string resourceId, string objectType, string propertyName, string propertyType);

Parameters

resourceId
String

The string-form key of the resource to get.

objectType
String

The expected type of the resource.

propertyName
String

The name of the property that serves as the key in the custom resource lookup logic.

propertyType
String

The type of the property that serves as the key, with type represented as a string.

Returns

Object

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

Proizvod Verzije
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6