Articles in this section
Category / Section

How to customize the visual style of form using WinForms SkinManager?

2 mins read

Applying theme

The Syncfusion WinForms Skin Manager control used to customize the Theme appearance of Windows Forms controls. It is applicable only if control is supported with VisualStyle options available in it. 

 

VisualStyle of Syncfusion Office2007 and Office2010Form can be customized by SkinManager. In Microsoft Forms, the VisualStyle support does not exist, so theme cannot customize by SkinManager. 

C#

//Code for Office2007Form
//Windows Form inherits from Office2007Form
public partial class Form1: Office2007Form
{
  //Set VisualStyle 
  //Helps to set Office2007Black Visual Style 
  SkinManager.SetVisualStyle(this, VisualTheme.Office2007Black);
  
  //Helps to set Office2007Blue Visual Style 
  SkinManager.SetVisualStyle(this, VisualTheme.Office2007Blue);
    
  //Helps to set Office2007Silver Visual Style 
  SkinManager.SetVisualStyle(this, VisualTheme.Office2007Silver);
    
  //Helps to set Managed Visual Style 
  SkinManager.SetVisualStyle(this, VisualTheme.Managed);
  ice2007Colors.ApplyManagedColors(this, Color.DarkMagenta); 
}
 
//Code for Office2010 Form
//Windows Form inherits from Office2010 Form
public partial class Form1 : Office2010Form
{
  //Set VisualStyle 
  //Helps to set Office2010Black Visual Style      
  SkinManager.SetVisualStyle(this, VisualTheme.Office2010Black);    
     
  //Helps to set Office2010Blue Visual Style      
  SkinManager.SetVisualStyle(this, VisualTheme.Office2010Blue);    
     
  //Helps to set Office2010Siver Visual Style      
  SkinManager.SetVisualStyle(this, VisualTheme.Office2010Silver);    
     
  //Helps to set Managed Visual Style      
  SkinManager.SetVisualStyle(this, VisualTheme.Managed);     
  Office2010Colors.ApplyManagedColors(this, Color.DarkMagenta); 
}

 

VB

'Code for Office2007Form
‘Windows Form inherits from Office2007Form
Partial Public Class Form1 Inherits Office2007Form
  ‘Windows Form inherits from Office2007Form
  'Helps to set Office2007Black VisualStyle     
  SkinManager.SetVisualStyle(Me, VisualTheme.Office2007Black)
    
  'Helps to set Office2007Blue VisualStyle    
  SkinManager.SetVisualStyle(Me, VisualTheme.Office2007Blue)   
 
  'Helps to set Office2007Silver VisualStyle     
  SkinManager.SetVisualStyle(Me, VisualTheme.Office2007Silver)
    
  'Helps to set Managed VisualStyle    
  SkinManager.SetVisualStyle(Me, VisualTheme.Managed)     
  Office2007Colors.ApplyManagedColors(Me, Color.DarkMagenta)
End Class
 
'Code for Office2010Form
‘Windows Form inherits from Office2010Form
Partial Public Class Form1 Inherits Office2010Form
  ‘Windows Form inherits from Office2010Form
  'Helps to set Office2010Black VisualStyle     
  SkinManager.SetVisualStyle(Me, VisualTheme.Office2010Black)
    
  'Helps to set Office2010Blue VisualStyle    
  SkinManager.SetVisualStyle(Me, VisualTheme.Office2010Blue)   
 
  'Helps to set Office2010Silver VisualStyle     
  SkinManager.SetVisualStyle(Me, VisualTheme.Office2010Silver)
    
  'Helps to set Managed VisualStyle    
  SkinManager.SetVisualStyle(Me, VisualTheme.Managed)     
  Office2010Colors.ApplyManagedColors(Me, Color.DarkMagenta)
End Class

 

Screenshot

Apply Office2007 theme in WinForms Skin

Figure: Office2007Form

 

Apply Office2010 theme in WinForms Skin

Figure: Office2010Form

 

Samples:

Office2007Form

C#:  SkinManagerOffice2007Form

VB:  SkinManagerOffice2007Form

 

Office2010Form

C#:  SkinManagerOffice2010Form

VB:  SkinManagerOffice2010Form

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied