You have a custom theme named MyTheme. The theme is defined in a file named MyTheme.thmx.
You have a console application that contains the following code segment. (Line numbers are included for reference only.)
01 using (SPSite site=new SPSite(http://intranet))
02 {
03 SPWeb web=site.OpenWeb();
04
05 }
You need to programmatically apply the theme to a SharePoint site.
Which code segment should you add to the console application?
A.
ThmxTheme.SetThemeUrlForWeb(web, “/_catalogs/theme/MyTheme.thmx”, False);
B.
web.AlternateCssUrl = “/_themes/MyTheme”;
C.
web.ApplyWebTemplate(“MyTheme.thmx”);
D.
web.ThemedCssFolderUrl = “/_themes/MyTheme”;
Explanation:
MNEMONIC RULE: ThmxThemeThmxTheme.SetThemeUrlForWeb Method (SPWeb, String, Boolean)
http://msdn.microsoft.com/en-us/library/ee658324.aspx