Class SfSkinManager
Applies and manages the themes for the controls and components which are derived from the IThemeProvider and IVisualStyle .
Inherited Members
Namespace: Syncfusion.WinForms.Controls
Assembly: Syncfusion.Core.WinForms.dll
Syntax
public class SfSkinManager : SkinManager
Remarks
The SfSkinManager applies the themes for the controls or components of IThemeProvider type. The ThemeName of the SfSkinManager must be available in ThemeHelper, Otherwise the default theme settings of control or component will be applied.
Constructors
SfSkinManager(IContainer)
Initializes a new instance of the SfSkinManager class and add this to the specified container.
Declaration
public SfSkinManager(IContainer container)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.IContainer | container | The System.ComponentModel.IContainer control. |
Remarks
This will allow to create only one SfSkinManager instance in a given container.
Properties
Component
Gets or sets the control or component to apply the theme settings.
Declaration
public Component Component { get; set; }
Property Value
Type |
---|
System.ComponentModel.Component |
ThemeName
Gets or sets a name of the theme to be applied to control.
Declaration
public string ThemeName { get; set; }
Property Value
Type |
---|
System.String |
Remarks
The theme name must be available in ThemeHelper, Otherwise the default theme settings will be applied to the control of the SfSkinManager.
Methods
Dispose(Boolean)
Releases all resources used by the SfSkinManager 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. |
Overrides
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. |
SetTheme(Component, String)
Sets the theme to given control and its inner controls which are derived from the IThemeProvider.
Declaration
public static void SetTheme(Component component, string themeName)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.Component | component | The System.ComponentModel.Component to set the theme. |
System.String | themeName | A name of the theme to be set to control. |
Remarks
This method will set the theme to controls which is derived from IThemeProvider.