Class SkinManager
Applies and manages the themes for the controls and components which are derived from the IVisualStyle and IThemeProvider
Namespace: Syncfusion.Windows.Forms
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class SkinManager : Component
Constructors
SkinManager(IContainer)
Constructor
Declaration
public SkinManager(IContainer container)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.IContainer | container |
Fields
ContainsSkinManager
This property helps to know, if the SkinManager is loaded in Form.
Declaration
public static bool ContainsSkinManager
Field Value
Type |
---|
System.Boolean |
IsThemeChanged
It helps to notify the Theme changes to all controls, when ApplicationVisualTheme is modified.
Declaration
public static bool IsThemeChanged
Field Value
Type |
---|
System.Boolean |
visualStyle
It stores the VisualStyle settings applied in SkinManager.
Declaration
public static string visualStyle
Field Value
Type |
---|
System.String |
Properties
ApplicationVisualTheme
Gets / sets the VisualTheme to be applied to controls and components loaded in Application.
Declaration
public static string ApplicationVisualTheme { get; set; }
Property Value
Type |
---|
System.String |
Controls
Gets or sets the System.Windows.Forms.Control to apply the theme settings
Declaration
public Component Controls { get; set; }
Property Value
Type |
---|
System.ComponentModel.Component |
VisualTheme
Gets or sets a name of the theme to be applied to System.Windows.Forms.Control.
Declaration
public VisualTheme VisualTheme { get; set; }
Property Value
Type |
---|
VisualTheme |
Methods
control_ControlAdded(Object, ControlEventArgs)
Occurs when new control is added to the control which has the theme settings that is set by the SkinManager.
Declaration
public static void control_ControlAdded(object sender, ControlEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
System.Windows.Forms.ControlEventArgs | e | A System.Windows.Forms.ControlEventArgs that contains events data. |
Dispose(Boolean)
Releases all resources used by the SkinManager class.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | True to release both managed and unmanaged resources; false to release only unmanaged resources. |
LoadAssembly(Assembly)
Loads the assembly to register the theme XML configured files.
Declaration
public static void LoadAssembly(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | An assembly that has the theme XML configuration file. |
SetVisualStyle(Component, VisualTheme)
Sets the theme to given component and its inner controls which are derived from the IVisualStyle
Declaration
public static void SetVisualStyle(Component component, VisualTheme visualTheme)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.Component | component | The System.ComponentModel.Component to set the theme. |
VisualTheme | visualTheme | A name of the visualTheme to be set to control. |
Remarks
This method will set the theme to controls which is derived from IVisualStyle
SetVisualStyle(Component, String)
Declaration
public static void SetVisualStyle(Component component, string visualStyle)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.Component | component | |
System.String | visualStyle |
SetVisualStyle(Control, VisualTheme)
Sets the theme to given control and its inner controls which are derived from IVisualStyle
Declaration
public static void SetVisualStyle(Control control, VisualTheme visualTheme)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | The System.Windows.Forms.Control to set the theme. |
VisualTheme | visualTheme |
Remarks
This method will set the theme to controls which is derived from IVisualStyle
SetVisualStyle(Control, String)
Sets the theme to given control and its inner controls which are derived from the IVisualStyle and IThemeProvider
Declaration
public static void SetVisualStyle(Control control, string visualStyle)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | The System.Windows.Forms.Control to set the theme. |
System.String | visualStyle | A name of the theme to be set to control. |
Remarks
This method will set the theme to controls which is derived from IVisualStyle and IThemeProvider