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.
Unfortunately, activation email could not send to your email. Please try again.

Setting Visual Style / Theme for All Controls (Syncfusion and standard WPF controls)

Thread ID:

Created:

Updated:

Platform:

Replies:

105217 Sep 18,2012 10:24 PM Feb 23,2016 03:59 AM WPF 12
loading
Tags: SkinManager
Brantley Schields
Asked On September 18, 2012 10:24 PM

Not entirely sure how I am making this so difficult. But after looking at the examples provided with my dashboard and reviewing some forum threads on here I just can't get this to work. I simply want to set the Office2007BlueStyle for all Controls ever used in my application.

I've managed to get all Non-Syncfusion controls to work by doing this:

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="DataTemplates/ProjectTemplates.xaml"/>
                <ResourceDictionary Source="/Syncfusion.Shared.WPF;component/SkinManager/SkinManager.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>

Not sure why Controls like ComboBox and Button work fine with the above, however, nothing with Syncfusion will display the style (ButtonAdv/ComboBoxAdv).

Thanks in Advance.

Dinesh Kumar P [Syncfusion]
Replied On September 20, 2012 02:27 PM

Hi Brantley,

 

Query: Set the Office2007BlueStyle for all Controls in the application.

 

This has been done using ‘Syncfusion:SkinStorage.VisualStyle’ property and its value set to ‘Office2007Blue’. Using ‘VisualStyle’ property we can apply specific theme for all the controls.

 

Please find the sample with VisualStyle set with Office2007Blue,

 

Apart from this, the added Resource dictionary “<ResourceDictionary Source="/Syncfusion.Shared.WPF;component/SkinManager/SkinManager.xaml" />” contains only styles for non- syncfusion controls  hence Syncfusion controls did not have style change.

 

Please refer the below link, to add resource dictionary for Syncfusion controls also with specific visual style,

 

http://help.syncfusion.com/UG/User%20Interface/WPF/Tools/default.htm#!documents/3344resourcedictiona.htm

 

 

Please let us know if you have any queries.

 

Regards,

P. Dinesh kumar



StyleToAllControls_3526a6d7.zip

Michelle Fowler
Replied On October 10, 2013 06:31 PM

The zip file can no longer be downloaded. Can you make it available again?

Karuppasamy P [Syncfusion]
Replied On October 17, 2013 02:05 AM

Hi Michelle,

Sorry for the delay being caused.

We have created a sample and attached here. Please find the sample below.
In the sample we have added Framework controls and Syncfusion Controls and have set the VisualStyle Office2007Blue using VisualStyle property.

Please let us know if you have any concerns.

Regards,
Karuppasamy p




StyleToAllControls_7cd2f039.zip

Administrator [Syncfusion]
Replied On December 11, 2013 09:47 AM

Hi, how would one do this in c# as to set all controls with one statement, ie...

SyncFusion.SkinStorage.SetVisualStyle(mainWindow, Skins.Blend);

Thank you

Administrator [Syncfusion]
Replied On December 11, 2013 09:49 AM

...Also how would one change the fontsize for all controls? Thanks :-)

Muthukumar A [Syncfusion]
Replied On December 12, 2013 06:51 AM

Hi Sharron,
Thanks for contacting Syncfusion Support.
Query #1 : How to set skin by Code behind.
We have created a sample based on your requirement. Please download the same from the below location.
Query #2 : How to Set Fontsize for all controls in Window.
Generally if we do not set FontSize explicitly, controls will get FontSize from their immediate parent. In your case if you want to set font size for all controls in Window, then you can set font size for window. This will be applied to all the controls in it.

Please let us know if you need  further assistance.

Thanks,
Muthukumar


StyleToAllControls_cbbfccc5.zip

Administrator [Syncfusion]
Replied On December 12, 2013 05:15 PM

Oh Wow!! Thank you!

Mehran
Replied On December 10, 2014 04:07 AM

Hi

The Zip file can not be downloaded, Cam you check it?

Regards,
Mehran

Mike Anderson
Replied On December 12, 2014 02:31 PM

I am having similar problems setting the visual style - the zip file is no longer valid, can you re-post the example please.

Jegan Raj M [Syncfusion]
Replied On December 15, 2014 12:16 AM

Hi Mehran & Mike,

Sorry for the inconvenience caused.
Please download the sample from below link.

Please let us know if you need further assistance.

Regards,
Jegan Raj M


Attachment: VisualStyle_Sample_76ac27c7.zip

Farrukh
Replied On February 22, 2016 04:26 AM

where should i write this line


Venkateshwaran Ramdoss [Syncfusion]
Replied On February 23, 2016 03:59 AM

Hi Farrukh,

Thank you for contacting Syncfusion Support.

We have created a simple sample based on your requirement. Please download the same from the below attachment. In this sample we have added "SkinStorage.SetVisualStyle(this,"Metro")" line in the constructor of the MainWindow to set the VisualStyle for all the control in the window.

Regards,
Venkateshwaran V.R.

Attachment: VisualStyleSample_5ba0aafa.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;