Class ComponentThemableElementTree
Represents a concrete implementation of RadElementTree that provides comprehensive theming and styling capabilities for Telerik controls, managing theme application and lifecycle within the element hierarchy.
Inherited Members
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll
Syntax
public class ComponentThemableElementTree : RadElementTree, IDisposable, IThemeChangeListener
Remarks
ComponentThemableElementTree extends RadElementTree with complete theming system integration, enabling controls to automatically apply visual themes, respond to runtime theme changes, and participate in application-wide theming infrastructure.
As an IThemeChangeListener, it automatically responds to theme changes and integrates with ThemeResolutionService for theme resolution. Includes animation management with suspension/resume capabilities and sophisticated fallback mechanisms.
Features style versioning for efficient change tracking, application theme integration, and proper resource cleanup through System.IDisposable. Used by virtually all Telerik controls for consistent theming behavior.
Constructors
ComponentThemableElementTree(IComponentTreeHandler)
Declaration
public ComponentThemableElementTree(IComponentTreeHandler owner)
Parameters
IComponentTreeHandler
owner
|
Properties
AnimationsEnabled
Gets value indicating whether the animated property changes are suspended for the control. Also see SuspendAnimations().
Declaration
public bool AnimationsEnabled { get; }
Property Value
System.Boolean
|
EnableApplicationThemeName
Declaration
public bool EnableApplicationThemeName { get; set; }
Property Value
System.Boolean
|
EnableTheming
Declaration
public bool EnableTheming { get; set; }
Property Value
System.Boolean
|
FallbackToControlDefault
Gets or sets a value indicating whether to fallback to control default theme if the control does not support the current theme.
Declaration
public bool FallbackToControlDefault { get; set; }
Property Value
System.Boolean
|
StyleVersion
Gets the version of the style applied to this themable element tree. This property is used internally.
Declaration
public int StyleVersion { get; set; }
Property Value
System.Int32
|
Theme
ThemeClassName
Gets or sets the class name string that ThemeResolutionService will use to find the themes registered for the control.
Declaration
public virtual string ThemeClassName { get; set; }
Property Value
System.String
|
Remarks
By default the return value is RadControl's type FullName; Some controls like drop down menu has different ThemeClassName depending on the runtime usage of the control.
ThemeName
Gets or sets control's preffered theme name. Themes are stored and retrieved using APIs of ThemeResolutionService.
Declaration
public string ThemeName { get; set; }
Property Value
System.String
|
Remarks
If ThemeResolutionService.ApplicatonThemeName refers to a non-empty string, the theme of a RadControl can differ from the one set using RadControls.ThemeName property. If the themes differ, the RadControls.ThemeName property will be overridden by ThemeResolutionService.ApplicatonThemeName. If no theme is registered with a name as ThemeResolutionService.ApplicatonThemeName, then control will revert to the theme specified by its ThemeName property. If ThemeName is assigned to a non-existing theme name, the control may have no visual properties assigned, which will cause it look and behave in unexpected manner. If ThemeName equals empty string, control's theme is set to a theme that is registered within ThemeResolutionService with the name "ControlDefault".
Methods
ApplyThemeToElement(RadObject)
ApplyThemeToElement(RadObject, Boolean)
Declaration
public void ApplyThemeToElement(RadObject element, bool recursive)
Parameters
RadObject
element
|
System.Boolean
recursive
|
ApplyThemeToElementTree()
Declaration
public void ApplyThemeToElementTree()
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
|
Overrides
ResumeAnimations()
Resumes the animated property changes for the conrol. For more info see SuspendAnimations()
Declaration
public void ResumeAnimations()
SuspendAnimations()
Suspends the animated property changes for the control. When animation are suspended property changes still occur but without aniumations.
Declaration
public void SuspendAnimations()
Explicit Interface Implementations
IThemeChangeListener.ControlThemeClassName
Declaration
string IThemeChangeListener.ControlThemeClassName { get; }
Returns
System.String
|
Implements
IThemeChangeListener.OnThemeChanged(ThemeChangedEventArgs)
Declaration
void IThemeChangeListener.OnThemeChanged(ThemeChangedEventArgs e)
Parameters
ThemeChangedEventArgs
e
|