New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public class ThemeResourceKey : ResourceKey

Inheritance: objectThemeResourceKey

Constructors

Initializes a new instance of the ThemeResourceKey class.

C#
public ThemeResourceKey()

Initializes a new instance of the ThemeResourceKey class.

C#
public ThemeResourceKey(Type themeType, Type elementType, object resourceId)
Parameters:themeTypeType

Type of the theme.

elementTypeType

Type of the visual element.

resourceIdobject

The resource id.

Initializes a new instance of the ThemeResourceKey class.

C#
public ThemeResourceKey(Type themeType, Type elementType)
Parameters:themeTypeType

Type of the theme.

elementTypeType

Type of the visual element.

Properties

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

C#
public override Assembly Assembly { get; }

Gets or sets the type of the visual element.

C#
public Type ElementType { get; set; }
Property Value:

The type of the visual element.

Gets or sets the resource id.

C#
public object ResourceId { get; set; }
Property Value:

The resource id.

Gets or sets the type of the theme.

C#
public Type ThemeType { get; set; }
Property Value:

The type of the theme.

Methods

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

C#
public override bool Equals(object obj)
Parameters:objobject

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.

Gets the default style key.

C#
public static ThemeResourceKey GetDefaultStyleKey(Theme theme, Type elementType, Type defaultTheme)
Parameters:themeTheme

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

elementTypeType

Type of the visual element.

defaultThemeType

The default theme.

Returns:

ThemeResourceKey

Gets the default style key.

C#
public static ThemeResourceKey GetDefaultStyleKey(Theme theme, Type elementType)
Parameters:themeTheme

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

elementTypeType

Type of the visual element.

Returns:

ThemeResourceKey

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

C#
public override string ToString()
Returns:

string