SPRibbon oribbon = SPRibbon.GetCurrent(this.Page);
if (oribbon != null)
{
//hide the ribbon buttons on the wiki page
oribbon.TrimById("Ribbon.WikiPageTab.Manage");
oribbon.TrimById("Ribbon.WikiPageTab.Share");
oribbon.TrimById("Ribbon.WikiPageTab.PubPageActions");
oribbon.TrimById("Ribbon.WikiPageTab.LibrarySettings");
//hide the ribbon menus on the webpart page
oribbon.TrimById("Ribbon.WebPartPage.Manage");
oribbon.TrimById("Ribbon.WebPartPage.Share");
oribbon.TrimById("Ribbon.WebPartPage.Approval");
oribbon.TrimById("Ribbon.WebPartPage.Workflow");
oribbon.TrimById("Ribbon.WebPartPage.Actions");
}
Reference :
Microsoft.Web.CommandUI DLL
Comments
Post a Comment