# AccordionPanel

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Control](/api/wisej.web/general/control.md)
  * [ScrollableControl](/api/wisej.web/containers/scrollablecontrol.md)
    * [Panel](/api/wisej.web/containers/wisej.web.panel.md)
      * [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md)

Represents a panel in a [Accordion](/api/wisej.web/containers/accordion.md) control.

{% tabs %}
{% tab title="C#" %}

```csharp
public class AccordionPanel : Panel
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class AccordionPanel
    Inherits Panel
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) AccordionPanel()

Initializes a new instance of the [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md) class.

### ![](/files/hsR4ok3152WyAf8J2C1u) AccordionPanel(text)

Initializes a new instance of the [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md) class and specifies the text to display as the title of the panel.

| Name     | Type                                                          | Description                          |
| -------- | ------------------------------------------------------------- | ------------------------------------ |
| **text** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The text for the title of the panel. |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) Accordion

[Accordion](/api/wisej.web/containers/accordion.md): Returns the parent [Accordion](/api/wisej.web/containers/accordion.md) control.

### ![](/files/hsR4ok3152WyAf8J2C1u) Collapsed

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns whether the [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md) is collapsed. (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ShowExpandButton

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value indicating that the panel can show the expand button on the title bar. (Default: `True`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Text

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text to display as the title of the [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md). (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Tools

[ComponentToolCollection](/api/wisej.web/editors/wisej.web.componenttoolcollection.md): Returns the instance of [ComponentToolCollection](/api/wisej.web/editors/wisej.web.componenttoolcollection.md) associated with this control.

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) CreateControlsInstance()

**Returns:** [ControlCollection](/api/wisej.web/general/control/wisej.web.control.controlcollection.md). A new instance of [ControlCollection](/api/wisej.web/general/control/wisej.web.control.controlcollection.md) assigned to the control.

### ![](/files/lIX317sDtMTZJBi9oSIx) GetAccordionPanelOfComponent(control)

Retrieves the panel that contains the specified [Control](/api/wisej.web/general/control.md).

| Parameter   | Type                                         | Description                                                   |
| ----------- | -------------------------------------------- | ------------------------------------------------------------- |
| **control** | [Control](/api/wisej.web/general/control.md) | The [Control](/api/wisej.web/general/control.md) to look for. |

**Returns:** [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md). The [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md) that contains the specified [Control](/api/wisej.web/general/control.md), or null if it cannot be found.

### ![](/files/lzopMboA31bVq8UIcbT3) OnVisibleChanged(e)

Fires the [VisibleChanged](/api/wisej.web/general/control.md#visiblechanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                        | Description      |
| --------- | ----------------------------------------------------------- | ---------------- |
| **e**     | [WisejEventArgs](/api/wisej.core/general/wisejeventargs.md) | Event arguments. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebUpdate(state)

Updates the client component using the state information.

| Parameter | Type                                                          | Description           |
| --------- | ------------------------------------------------------------- | --------------------- |
| **state** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic state object. |

### ![](/files/lzopMboA31bVq8UIcbT3) RenderPanelProperties(config)

| Parameter  | Type                                                          | Description |
| ---------- | ------------------------------------------------------------- | ----------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) |             |

### ![](/files/hsR4ok3152WyAf8J2C1u) Update()

Overridden to update the parent Accordion when in design mode.

### ![](/files/lzopMboA31bVq8UIcbT3) UpdateZOrder()

## Implements

| Name                                                                              | Description                                                                                                           |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.       |
| [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                         |
| [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget.md)                 | Controls that support drag & drop operations implement this interface.                                                |
| [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md)                           | Provides access to common image properties across the controls that implement this interface.                         |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                        |
| [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/wisej.web/general/control.md) class must implement this interface. |
| [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                                 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
