Class 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
Inherited Members
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll
Syntax
public class ThemeSource : RadObject, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Constructors
ThemeSource()
Declaration
public ThemeSource()
Fields
StorageTypeProperty
ThemeLocationProperty
Properties
CallingAssembly
Declaration
public Assembly CallingAssembly { get; set; }
Property Value
System.Reflection.Assembly
|
OwnerThemeManager
Gets or sets the owner theme manager component. Generally used by Form's designer.
Declaration
public RadThemeManager OwnerThemeManager { get; set; }
Property Value
RadThemeManager
|
SettingsAreValid
Gets a value indicating whether property values are valid
Declaration
public bool SettingsAreValid { get; }
Property Value
System.Boolean
|
StorageType
Gets or sets File or Resource type of storage for the theme file
Declaration
[RadPropertyDefaultValue("StorageType", typeof(ThemeSource))]
public ThemeStorageType StorageType { get; set; }
Property Value
ThemeStorageType
|
ThemeLoadingError
Gets value indicating the error message if Theme was not loaded successfully.
Declaration
public string ThemeLoadingError { get; }
Property Value
System.String
|
ThemeLocation
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"
Declaration
public string ThemeLocation { get; set; }
Property Value
System.String
|
ThemeStorageValid
Indicates whether the specified theme was loaded successfully.
Declaration
public bool ThemeStorageValid { get; }
Property Value
System.Boolean
|
Methods
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
ReloadThemeFromStorage()
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.
Declaration
public virtual void ReloadThemeFromStorage()