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

How to install a custom theme

I'm trying to install a custom theme from Theme builder for my MVC3 project.

This is the code in my Layout :

 @(Html.Syncfusion().StyleManager()
    .Combine(false)
    .Minify(false)
    .Register(s =>
    {
        s.Add(ComponentType.GenericDropDown).Overridable(true);       
        s.Add("~/Content/themes/metro/Metro_sftools.css").DontOverride();
    }))

The theme doesn't change, maybe it's a wrong way.

Please can you help?

1 Reply

ME Meena Syncfusion Team July 25, 2013 09:57 AM UTC

 

Hi Verleene,

 

Thanks for contacting Syncfusion forums.

 

We would like to let you know that the API “CustomCSS” should be applied to the control for setting custom theme. Please refer the below steps.

 

1.       Download a custom theme css from Syncfusion Theme Studio.

 

http://mvc.syncfusion.com/ThemeStudio/

 

2.       Add the downloaded css file and refer it in your MVC application.

 

<code>

[_Layout.cshtml]

 

@(Html.Syncfusion().StyleManager().Combine(true).Minify(true)

        .Register(component =>

            {

                component.Add("~/Content/Site.css");

                component.Add("~/Content/MetroGreen-sftools.css");

              

            }))

 

</code>

 

3.       Invoke the control helper using CustomCSS API to apply the custom theme.

 

<code>

@{Html.Syncfusion().GenericDropDown("myDropDown").Width(300).TargetContentId("drop-down-contents").CustomCSS("MetroGreen").Render();

    }

 

Here “MetroGreen” is the root css class name in custom theme css file.

 

</code>

 

We have prepared a simple sample with custom theme for your reference and it is available in the below link.

 

Kindly have a look at the above sample and let us know if you have any other concerns.

 

Regards,

Meena



GDD_CustomTheme_f8b15c14.zip

Loader.
Live Chat Icon For mobile
Up arrow icon