ThemeSource
ThemeSource is used to load user-defined themes for RadControls in an application. Themes load immediately when correct property values specified and last for the life time of the application. After a theme is loaded it can be used by the corresponding types of controls placed on any Form of the application. ThemeSource object are generally used by ThemeManager component placed on a Form
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
public class ThemeSource : RadObject, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Inheritance: objectDisposableObjectRadObjectThemeSource
Implements:
Inherited Members
Constructors
public ThemeSource()
Fields
public static RadProperty StorageTypeProperty
public static RadProperty ThemeLocationProperty
Properties
[Browsable(false)]
public Assembly CallingAssembly { get; set; }
Gets or sets the owner theme manager component. Generally used by Form's designer.
public RadThemeManager OwnerThemeManager { get; set; }
Gets a value indicating whether property values are valid
public bool SettingsAreValid { get; }
Gets or sets File or Resource type of storage for the theme file
public ThemeStorageType StorageType { get; set; }
Gets value indicating the error message if Theme was not loaded successfully.
public string ThemeLoadingError { get; }
Gets or sets the full resource name if StorageType is Resource. Example: "MyNamespace.MyThemeFileName.xml".
If the StorageType specified is File, then the value of this property should represent the full or relative file path,
accessible by the application. The "" sign can be used to substitute the application executable path.
Eg. "C:\MyApp\MyThemeFileName.xml" or "....\MyThemeFileName.xml" or "\MyThemeFileName.xml"
public string ThemeLocation { get; set; }
Indicates whether the specified theme was loaded successfully.
public bool ThemeStorageValid { get; }
Methods
Releases managed resources by clearing the property store and disposing value animators to prevent memory leaks.
protected override void DisposeManagedResources()
Overrides:
Loads the theme from the file resource specified and registers it into ThemeResolutionService. Thais method is called immediately when correct ThemeLocation and StorageType are specified.
public virtual void ReloadThemeFromStorage()