Follow in Twitter & Facebook


Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools


Sunday, June 3, 2012

Programmatically apply Theme to SharePoint Site

In this article we will discuss how to apply theme to a SharePoint site. Also check my last article on how to create a custom theme for SharePoint 2010 and how to upload custom theme to SharePoint 2010.

Below is the SharePoint 2010 object model code to apply theme to a SharePoint 2010 site.

using (SPSite site=new SPSite(“http://[Site URL]”))
{
SPWeb web=site.OpenWeb();

ThmxTheme.SetThemeUrlForWeb(web, "/_catalogs/Theme/MyCutomTheme.thmx", False);

}




0 on: "Programmatically apply Theme to SharePoint Site"