Saturday, June 25, 2011

Why Microsoft recommended that should not use Microsoft.Web.CommandUI.dll in any SharePoint products??

Almost asp controls of SharePoint has imported the namespace "Microsoft.web.commandui.dll" to manage the Ribbon. However, this dll wasn't recommended to use if you need to customize your Ribbon. To use the type or namespace of Ribbon, we should use "Microsoft.SharePoint.WebControls". Or course, in Microsoft.SharePoint.WebControls namespace also has implemented SPRibbon, but it's not enough.

Deassembly the WebControls namespace, SPRibbon only has some types, especially it does not have TrimById method, just Microsoft.Web.CommandUI.dll has.

I don't understand why Microsoft recommended that should not use this dll!??

Do not use types or members of the Microsoft.Web.CommandUI namespace for development within a SharePoint environment, but instead use SPRibbon and related types in theMicrosoft.SharePoint.WebControls namespace. For information about customizing the ribbon in SharePoint Foundation see Server Ribbon in SharePoint Foundation.

Anybody helps me?

No comments: