Class
ThemeResourceKey

ThemeResourceKey class is used by the theming mechanism. Every visual control has a control template with different ThemeResourceKey for each theme.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
public class ThemeResourceKey : ResourceKey

Inheritance: objectThemeResourceKey

Constructors

ThemeResourceKey()

Initializes a new instance of the ThemeResourceKey class.

Declaration

cs-api-definition
public ThemeResourceKey()

ThemeResourceKey(Type, Type)

Initializes a new instance of the ThemeResourceKey class.

Declaration

cs-api-definition
public ThemeResourceKey(Type themeType, Type elementType)

Parameters

themeType

Type

Type of the theme.

elementType

Type

Type of the visual element.

ThemeResourceKey(Type, Type, object)

Initializes a new instance of the ThemeResourceKey class.

Declaration

cs-api-definition
public ThemeResourceKey(Type themeType, Type elementType, object resourceId)

Parameters

themeType

Type

Type of the theme.

elementType

Type

Type of the visual element.

resourceId

object

The resource id.

Properties

Assembly

Gets an assembly object that indicates which assembly's dictionary to look in for the value associated with this key.

Declaration

cs-api-definition
public override Assembly Assembly { get; }

Property Value

Assembly

ElementType

Gets or sets the type of the visual element.

Declaration

cs-api-definition
public Type ElementType { get; set; }

Property Value

Type

The type of the visual element.

ResourceId

Gets or sets the resource id.

Declaration

cs-api-definition
public object ResourceId { get; set; }

Property Value

object

The resource id.

ThemeType

Gets or sets the type of the theme.

Declaration

cs-api-definition
public Type ThemeType { get; set; }

Property Value

Type

The type of the theme.

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current object.

Returns

bool

True if the specified object is equal to the current object; otherwise, false.

Exceptions

NullReferenceException

The obj parameter is null.

GetDefaultStyleKey(Theme, Type)

Gets the default style key.

Declaration

cs-api-definition
public static ThemeResourceKey GetDefaultStyleKey(Theme theme, Type elementType)

Parameters

theme

Theme

The theme of the main control (control that implements IThemable interface).

elementType

Type

Type of the visual element.

Returns

ThemeResourceKey

GetDefaultStyleKey(Theme, Type, Type)

Gets the default style key.

Declaration

cs-api-definition
public static ThemeResourceKey GetDefaultStyleKey(Theme theme, Type elementType, Type defaultTheme)

Parameters

theme

Theme

The theme of the main control (control that implements IThemable interface).

elementType

Type

Type of the visual element.

defaultTheme

Type

The default theme.

Returns

ThemeResourceKey

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Declaration

cs-api-definition
public override string ToString()

Returns

string