1. Create a web form: accordion. aspx
2. Add a scriptmanager Control
3. Add an accordion control. (Note: When you drag the accordion control to the form, the form is displayed as anything. Add code to the source code only)
4. Add <panes> </panes>
5. Drag several accordionpane in <panes> </panes> (you need to drag several layers)
6. Add code to accordionpanel:Code
7. OK, run, it can be used, but there is no border or colors.
8. Now you have to add the border color to the title.
① Open the accordion1 attribute panel and set the size, height (300px), width (200px)
② Set the title style, headercssclass (accordionheader)
③ Set the content style, contentcssclass (accordioncontant)
8. Create a style.Code
9. OK. Try it !!!
10. Explanation of common attributes
1. Set the size, height (300px), width (200px)
2. Set the title style, headercssclass (accordionheader)
3. Set the content style, contentcssclass (accordioncontant)
4. Set fade-in, fadetransitions = "True/false"
5. Select the index, selectedindex = "0/1/2/3/4"
6. Automatic size (scroll bar) and autosize
7,Transitionduration: The time to expand or collapse An accordionpane, in milliseconds.
8,Framespersecond: Expand or collapse the number of frames per second of an accordionpane.
9,AccordionDisplay and layout.
AccordionThe following three display and layout modes are supported:
None-When accordion is expanded or folded, the size of accordion is automatically changed based on the content displayed inside the accordion, without any restrictions. Setting the autosize attribute to none may cause other elements on the page to move up or down following the size change of accordion.
Limit-It will make the accordion control never extend its size beyond the specified height attribute. If you set the autosize attribute to limit, it may cause a situation where, the content in it needs to be rolled through the scroll bar.
Fill-It will keep the accordion Control always at the height defined by its height attribute.
10,Requireopenedpane: If it is set to true, if an accordionpane is expanded, it will no longer be folded.
11,Supporessheaderpostbakcs: If this parameter is set to true, the page will be submitted when you click a pane, that is, whether to display the whole page refresh.
12,Headertemplate/contenttemplate, datasource, performanceid, datamember. These are all used for data binding. This article will not involve.