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.

How to install a custom theme

Thread ID:

Created:

Updated:

Platform:

Replies:

110182 Jul 23,2013 11:07 AM Jul 25,2013 05:57 AM ASP.NET MVC (Classic) 1
loading
Tags: Tools
verleene
Asked On July 23, 2013 11:07 AM

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?

Meena [Syncfusion]
Replied On July 25, 2013 05:57 AM

 

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

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.

;