New to Telerik UI for WinForms? Start a free 30-day trial

Maps theme-effective element types to the factories that create their state managers.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public sealed class ItemStateManagerFactoryRegistry

Inheritance: objectItemStateManagerFactoryRegistry

Methods

Registers the state-manager factory for a theme-effective element type, replacing any prior registration for that type.

C#
public static void AddStateManagerFactory(ItemStateManagerFactoryBase stateManagerFactory, Type themeType)
Parameters:stateManagerFactoryItemStateManagerFactoryBase

The factory used to create the type's state manager.

themeTypeType

The element type used as the registry key.

Gets a registered state-manager factory, optionally searching the base types of a RadItem-derived type.

C#
public static ItemStateManagerFactoryBase GetStateManagerFactory(Type themeType, bool searchBaseTypes)
Parameters:themeTypeType

The theme-effective element type to look up.

searchBaseTypesbool

true to search base types when no exact factory is registered. Use false for non-RadItem implementations of IStylableElement that have no registered factory.

Returns:

ItemStateManagerFactoryBase

The exact or first matching base-type factory, or null when no factory is found and the search completes.

Exceptions: ArgumentException

themeType is neither a RadItem type nor an IStylableElement type.

ArgumentNullException

searchBaseTypes is true, themeType implements IStylableElement without deriving from RadItem, and no factory is registered for the type or any of its base types.

Gets the factory registered for the specified type without searching its base types.

C#
public static ItemStateManagerFactoryBase GetStateManagerFactory(Type themeType)
Parameters:themeTypeType

The theme-effective element type to look up.

Returns:

ItemStateManagerFactoryBase

The registered factory, or null if no factory is registered.