Use quickpart to customize sitebart for webpart

Source: Internet
Author: User

 Finally arrivedQuickpartThe last chapter of the series, and these knowledge points are also important and fully mastered.QuikpartFeature series knowledge points for future developmentWebpartIt is also handy !, So I suggest you take these knowledge points seriously and rememberDemo, Only personalDemoYou will understandThat's exactly the same thing. Two times back to life, Less talk, more work. Start of work.

First, add a class, which is definedMysitebar.

Back to project remember to add Quickpart. dll. The file is displayed on the port you deploy Bin In the folder directory, the author deploys 8080. Therefore:

Back to backgroundCodePage, remember the applicationMicrosoft. PRC. SharePointAndMicrosoft. Sharepoint. dll.

First, inheritEditorpartInterface, rewrite the two virtual methods of this interface, which areApplychanges (), syncchanges (), and then rewrite rendercontents (), createchilcontrols ()For more information about the code, see:

 

 

 

Continue to return to the long-overdueTreeviewcontrolBackground code page, inheritedIwebeditableInterface. Click on the right side and then display the interface.

This is an extra one at the bottom of the Code. Ediorpartconllection createeditorparts () Method. The created Mysitebar Class comes in handy,

Someone may ask, what is the function of this method? This is to generate the edit column on the right, and there is a sidebar that can be scaled up or down.

OKFinally, wait until the exciting time, click the project to regenerate again, and then go to the website page and clickProviderEdit, this will show you more,

The Sidebar (in red) and the created drop-down box (in blue ).

Select the drop-down box value and click Application

 At this time, careful friends will find that the document name also changes to "notice ".

At this point, I have explained Quickpart Application Series Over . Mainly around Demo Description, hoping to help you. As long as you have a solid grasp of your talents and make use of them flexibly, I believe that you will be able to give full play to his greatest use in actual development.

 

 

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.