skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadThemeComponentBase

Base class used by RadThemeManager to recognize classes that load themes from resources in a class library. This abstract class provides the foundation for theme components that can load and manage visual themes.

Inheritance
System.Object
RadThemeComponentBase
FluentTheme
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll

Syntax

public abstract class RadThemeComponentBase : Component
Remarks

RadThemeComponentBase serves as the base class for all theme components in the Telerik WinControls suite. It provides infrastructure for loading themes from embedded resources, managing theme lifecycle, and integrating with the design-time environment. Theme components inheriting from this class are automatically recognized by the RadThemeManager and can participate in the theming system.

Constructors

RadThemeComponentBase()

Initializes a new instance of the RadThemeComponentBase class.

Declaration
public RadThemeComponentBase()

Properties

IsDesignMode

Gets a value indicating whether the component is currently in design mode.

Declaration
public bool IsDesignMode { get; }
Property Value
System.Boolean

true if the component is in design mode; otherwise, false.

Remarks

This property is used to determine if the component is being used in a design-time environment such as Visual Studio's form designer.

Site

Gets or sets the site of the component.

Declaration
public override ISite Site { get; set; }
Property Value
System.ComponentModel.ISite

The System.ComponentModel.ISite associated with the component.

Remarks

When the site is set in design mode, this triggers the theme loading process if the theme is not already available in the repository.

ThemeName

Gets the name of the theme provided by this component.

Declaration
public virtual string ThemeName { get; }
Property Value
System.String

The theme name, or an empty string if no theme name is specified.

Remarks

This property is used by the theming system to identify and reference the theme. Derived classes should override this property to return the actual theme name.

Methods

CreateContext(Control)

Creates a theme context for the specified control. This method is used internally by the theming system.

Declaration
public static RadThemeComponentBase.ThemeContext CreateContext(Control control)
Parameters
System.Windows.Forms.Control control

The control to create a context for.

Returns
RadThemeComponentBase.ThemeContext

A RadThemeComponentBase.ThemeContext instance for the specified control.

Remarks

This method creates a ThemeContext that can be used to save and restore control states during theme operations.

DeserializeTheme()

Deserializes the theme associated with this component. Override this method to provide custom theme deserialization logic.

Declaration
public virtual void DeserializeTheme()
Remarks

This method is called during the theme loading process to deserialize theme data from its stored format. The default implementation does nothing.

Dispose(Boolean)

Releases the unmanaged resources used by the RadThemeComponentBase and optionally releases the managed resources.

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

This method removes the theme from the repository when the component is disposed in design mode.

Load()

Loads the theme associated with this component. Derived classes must implement this method to provide the theme loading logic.

Declaration
public abstract void Load()
Remarks

This method is called to load the theme into the theme repository. Implementations should load theme data from embedded resources or other sources and register the theme with the ThemeRepository.

LoadResource(Assembly, String)

Loads a theme resource from the specified assembly and resource path.

Declaration
protected virtual bool LoadResource(Assembly resourceAssembly, string resourcePath)
Parameters
System.Reflection.Assembly resourceAssembly

The assembly containing the theme resource.

System.String resourcePath

The path to the theme resource within the assembly.

Returns
System.Boolean

true if the resource was loaded successfully; otherwise, false.

Remarks

This method loads a theme from an embedded resource, deserializes it using a TSSPThemeReader, and adds it to the ThemeRepository. If loading fails, an error message is displayed.

RemoveThemeCore()

Removes the theme from the theme repository. Override this method to provide custom theme removal logic.

Declaration
protected virtual void RemoveThemeCore()
Remarks

This method is called during component disposal to clean up the theme from the theme repository. The default implementation removes the theme by name.

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.