SharePoint Study Notes-ribbon series-6. delete a specified control in ribbon (custom tab for Users)

Source: Internet
Author: User

In the previous sections, we added tabs, groups, and buttons to complete the "add" operation. Here we are going to delete a button control on ribbon. It should be noted that the deletion here is actually implemented through hiding.

 

The procedure is as follows:
1. Use the SharePoint project created earlier
Add a new blank element in this project, as shown in figure


2. define the content of this element to delete it.
To open the elements. xml file under removeribbonbutton, the content of the file is as follows:

<? XML version = "1.0" encoding = "UTF-8" ?>
< Elements Xmlns = "Http://schemas.microsoft.com/sharepoint" >
< Customaction
ID = "Ribbon. customtabexample. cutomimggroup. removeribbonbutton"
Location = "Commandui. Ribbon"
Registrationid = "101"
Registrationtype = "List" >
< Commanduiextension >
< Commanduidefinitions >
< Commanduidefinition
Location = "Ribbon. customtabexample. cutomimggroup. customimggrouphello"   />
</ Commanduidefinitions >
</ Commanduiextension >
</ Customaction >
</ Elements >

In this example, we determine that the button to be deleted is at ribbon. customtabexample. cutomimggroup. customimggrouphello (Format: [ribbon]. [Tab]. [name of the target group]. [name of the target control]), so here, location is: Location = "ribbon. customtabexample. cutomimggroup. customimggrouphello"

3. Deploy custom group items
Press F5. The SharePoint development tool in Visual Studio 2010 will automatically build and deploy functions.
Go to the document library of the website or sub-website. View the result as shown in

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.