We can set a custom theme in this manner:
SPWeb objectWeb = objectSite.OpenWeb();
ThmxTheme.SetThemeUrlForWeb(objectWeb , "/_catalogs/theme/CustomTheme.thmx", true);
what if we want to revert back to default theme?
call the method again with a null parameter:
ThmxTheme.SetThemeUrlForWeb(web, null, true);
SPWeb objectWeb = objectSite.OpenWeb();
ThmxTheme.SetThemeUrlForWeb(objectWeb , "/_catalogs/theme/CustomTheme.thmx", true);
what if we want to revert back to default theme?
call the method again with a null parameter:
ThmxTheme.SetThemeUrlForWeb(web, null, true);
No comments:
Post a Comment