Class AccordionItemBuilder
Inheritance
System.Object
Syncfusion.EJ2.ControlBuilder
AccordionItemBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class AccordionItemBuilder : ControlBuilder
Constructors
AccordionItemBuilder()
Declaration
public AccordionItemBuilder()
AccordionItemBuilder(List<AccordionItem>)
Declaration
public AccordionItemBuilder(List<AccordionItem> collection)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<AccordionItem> |
collection |
|
Methods
Add()
Declaration
Content(String)
Sets the text content to be displayed for the Accordion item.
You can set the content of the Accordion item using content
property.
It also supports to include the title as HTML element
, string
, or query selector
.
Declaration
public AccordionItemBuilder Content(string content)
Parameters
Type |
Name |
Description |
System.String |
content |
|
Returns
ContentTemplate(Action<Object>)
Declaration
public AccordionItemBuilder ContentTemplate(Action<object> template)
Parameters
Type |
Name |
Description |
System.Action<System.Object> |
template |
|
Returns
ContentTemplate(Func<Object, Object>)
Declaration
public AccordionItemBuilder ContentTemplate(Func<object, object> template)
Parameters
Type |
Name |
Description |
System.Func<System.Object, System.Object> |
template |
|
Returns
CssClass(String)
Defines single/multiple classes (separated by a space) are to be used for Accordion item customization.
Declaration
public AccordionItemBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Disabled(Boolean)
Sets true to disable an accordion item.
Declaration
public AccordionItemBuilder Disabled(bool disabled)
Parameters
Type |
Name |
Description |
System.Boolean |
disabled |
|
Returns
Expanded(Boolean)
Sets the expand (true) or collapse (false) state of the Accordion item. By default, all the items are in a collapsed state.
Declaration
public AccordionItemBuilder Expanded(bool expanded)
Parameters
Type |
Name |
Description |
System.Boolean |
expanded |
|
Returns
Sets the header text to be displayed for the Accordion item.
You can set the title of the Accordion item using header
property.
It also supports to include the title as HTML element
, string
, or query selector
.
Declaration
public AccordionItemBuilder Header(string header)
Parameters
Type |
Name |
Description |
System.String |
header |
|
Returns
IconCss(String)
Defines an icon with the given custom CSS class that is to be rendered before the header text.
Add the css classes to the iconCss
property and write the css styles to the defined class to set images/icons.
Adding icon is applicable only to the header.
Declaration
public AccordionItemBuilder IconCss(string iconCss)
Parameters
Type |
Name |
Description |
System.String |
iconCss |
|
Returns
Id(String)
Sets unique ID to accordion item.
Declaration
public AccordionItemBuilder Id(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns
Visible(Boolean)
Sets false to hide an accordion item.
Declaration
public AccordionItemBuilder Visible(bool visible)
Parameters
Type |
Name |
Description |
System.Boolean |
visible |
|
Returns