We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Skinning default controls


I just installed the Syncfusion Community Edition (thanks Syncfusion guys!). I would like to skin an existing application.  It appears that the SkinManager can only skin Syncfusion controls.  I read the doc and followed instructions. Did I miss something?

Thanks in advance!

5 Replies

KR Kannan R Syncfusion Team March 16, 2017 06:23 PM UTC

Hi Craig, 
 
Thank you for contacting Syncfusion support.  
 
Query 1: How to apply Style/Theme appearance of the Syncfusion Windows Forms controls? 
 
It is possible to customize the Style and Theme appearance of Syncfusion controls by using its property named VisualStyle. Kindly check with below Knowledge Base article for your reference.  
 
 
Query 2: How to Skin the Windows Forms control using SkinManager? 
 
SkinManager can also be used to customize the Theme appearance of Windows Forms controls. But it is applicable only if control is supported with VisualStyle options available in it. Please make use of below UG documentation for your further reference.  
 
 
We also suggest you to make use of the sample available in our Sample Browser.  
 
Sample Path: Syncfusion\EssentialStudio\[Installed Version]\Windows\Tools.Windows\Samples\Skin Manager\Skin Manager\CS  
 
Kindly check with above solution and let us know if it is helpful. 
 
Regards 
Kannan 
  



CB Craig Brown March 16, 2017 07:10 PM UTC

I did all that. I tried the included demo and added standard windows controls. The Syncfusion controls are "skinned" but the default controls are unchanged. 


KR Kannan R Syncfusion Team March 17, 2017 04:52 AM UTC

Hi Craig 
 
Thank you for your update.  
 
As we explained in our last update, Syncfusion SkinManager will update the VisualStyle property of assigned controls and child elements, based on the provided settings.  
 
For Example 
 
Almost all Syncfusion Windows Forms controls Theme functionality is implemented based on common standard defined using IVisualStyle Interface. If SkinManager is applied to Form with VisualStyle as Metro, it will iterate all the child controls loaded in it, classify the required Syncfusion controls which is a type of IVisualStyle Interface, apply the Theme and Syncfusion Windows Forms control appearance will be updated based on the applied Theme.  
 
So SkinManager can only be used for Syncfusion Windows Forms controls, not the Microsoft default controls.  
 
Kindly check with the above solution and let us know if it helps.  
 
Regards 
Kannan 



CB Craig Brown March 17, 2017 08:49 PM UTC

Got it. I need to replace current controls with Syncfusion controls. I started to do that but hit a strange error. If I name my SyncFusion control the same name as the default control (in a new form) I get an error "property value is not valid".  For example: A control default name is editableList1. I want to change it to myListBox.  It won't allow me to do this. 


MK Mallika Kannan Syncfusion Team March 20, 2017 09:57 AM UTC

Hi Craig,   
   
Thanks for your update.   
   
As we have explained in our last update, Syncfusion SkinManager control Theme customization will be applied for the controls, that supports IVisualStyle and it is not available in EditableList control. So it is needed to apply the VisualStyle by programmatically.    
   
For example,   
   
In EditableList control has following Visual Style   
   
·         Default   
·         Metro   
   
Please refer the following Code example to set the VisualTheme.   
   
Code Example [C#]:   
   
   
// Instance Initialization   
   
Syncfusion.Windows.Forms.Tools.EditableList myListBox = new Syncfusion.Windows.Forms.Tools.EditableList();   
   
// Instance Naming   
   
this.myListBox.Name = "myListBox";   
   
   
// For Metro Style   
          
private void buttonAdv1_Click(object sender, EventArgs e)   
{   
    editableList1.Style = Syncfusion.Windows.Forms.Appearance.Metro;   
   //SkinManager.SetVisualStyle(editableList1, VisualTheme.Metro);       
           
}   
           
//For Default Style   
         
private void buttonAdv2_Click(object sender, EventArgs e)          
{              
   editableList1.Style = Syncfusion.Windows.Forms.Appearance.Default;   
   //SkinManager.SetVisualStyle(editableList1, VisualTheme.Office2010Black);           
}   
   
   
   
Screenshot   
   
        
    Figure 1: Metro Theme Style.   
   
     
   Figure 2: Default Theme Style.   
   
We have also prepared the sample for your reference. It can be downloaded from the following Link.   
   
 
Also we are not able to reproduce the problem with replacing  Kindly check with above solution and let us know if it is helpful.   
   
Regards   
Mallika  
 
 


Loader.
Live Chat Icon For mobile
Up arrow icon