In This Article

ResourceKeyExtensionBase<T> Class

A markup extension that converts the specified enum value to the related full string resource key.

public abstract class ResourceKeyExtensionBase<T> where T : Enum
Type Parameters:
T -

The Type of enum value.

Inheritance:
object object
Derived:
ControlThemeKeyExtension GlyphTemplateKeyExtension ThemeResourceKeyExtension

Constructors

ResourceKeyExtensionBase()

Initializes an instance of the class.

protected ResourceKeyExtensionBase()

ResourceKeyExtensionBase(T)

Initializes an instance of the class, using the specified enum value.

protected ResourceKeyExtensionBase(T resourceKind)
Parameter Type Description
resourceKind T

The enum value for which a resource key will be returned.

Properties

ResourceKind

The enum value for which a resource key will be returned.

[ConstructorArgument("resourceKind")]
public T? ResourceKind { get; set; }

Property Value

T

Methods

GetResourceKey()

Returns the resource key for the ResourceKind.

protected abstract string GetResourceKey()

Returns

string:

The resource key.

ProvideValue(IServiceProvider)

Returns the resource key for the ResourceKind.

public virtual object? ProvideValue(IServiceProvider serviceProvider)
Parameter Type Description
serviceProvider IServiceProvider

An object that can provide services for the markup extension.

Returns

object:

The object value to set on the property where the extension is applied.

Inherited Members

Extension Methods