# C1.Web.Mvc.Accordion

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Web_Mvc_Accordion" data-uid="C1.Web.Mvc.Accordion" class="text-break">Accordion Class
</h1>
  <div class="markdown level0 summary"><p>Defines a control which is a vertically stacked set of interactive headings that each contain a title.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.Web.Mvc.Component.html">Component</a></div>
    <div class="level2"><a class="xref" href="C1.Web.Mvc.Control.html">Control</a></div>
    <div class="level3"><span class="xref">Accordion</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.html.ihtmlcontent">IHtmlContent</a></div>
    <div><a class="xref" href="C1.Web.Mvc.ITemplate.html">ITemplate</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Web.Mvc.html">C1.Web.Mvc</a></h6>
  <h6><strong>Assembly</strong>: C1.AspNetCore.Mvc.dll</h6>
  <h5 id="C1_Web_Mvc_Accordion_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class Accordion : Control, IHtmlContent, ITemplate</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class Accordion
    Inherits Control
    Implements IHtmlContent, ITemplate</code></pre>
  </div>
  <h5 id="C1_Web_Mvc_Accordion_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>The headings function as controls that enable users to reveal or hide their associated sections of content. Accordions are commonly used to reduce the need to scroll when presenting multiple sections of content on a single page.</p>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Web_Mvc_Accordion__ctor_Microsoft_AspNetCore_Mvc_Rendering_IHtmlHelper_System_String_" data-uid="C1.Web.Mvc.Accordion.#ctor(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper,System.String)">
          <a class="xref" href="C1.Web.Mvc.Accordion.-ctor.html#C1_Web_Mvc_Accordion__ctor_Microsoft_AspNetCore_Mvc_Rendering_IHtmlHelper_System_String_">Accordion(IHtmlHelper, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates one <a class="xref" href="C1.Web.Mvc.Accordion.html">Accordion</a> instance.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Web_Mvc_Accordion_AllowCollapseAll" data-uid="C1.Web.Mvc.Accordion.AllowCollapseAll">
          <a class="xref" href="C1.Web.Mvc.Accordion.AllowCollapseAll.html#C1_Web_Mvc_Accordion_AllowCollapseAll">AllowCollapseAll</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that determines whether users should be allowed to collapse all the items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Accordion_AllowExpandMany" data-uid="C1.Web.Mvc.Accordion.AllowExpandMany">
          <a class="xref" href="C1.Web.Mvc.Accordion.AllowExpandMany.html#C1_Web_Mvc_Accordion_AllowExpandMany">AllowExpandMany</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that determines whether users should be allowed to expand multiple panes at a time.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Accordion_AutoSwitch" data-uid="C1.Web.Mvc.Accordion.AutoSwitch">
          <a class="xref" href="C1.Web.Mvc.Accordion.AutoSwitch.html#C1_Web_Mvc_Accordion_AutoSwitch">AutoSwitch</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that determines whether the control should switch panes automatically when the user selects a pane using the arrow keys.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Accordion_IsAnimated" data-uid="C1.Web.Mvc.Accordion.IsAnimated">
          <a class="xref" href="C1.Web.Mvc.Accordion.IsAnimated.html#C1_Web_Mvc_Accordion_IsAnimated">IsAnimated</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that determines whether collapsing or expanding panes should be animated.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Accordion_OnClientSelectedIndexChanged" data-uid="C1.Web.Mvc.Accordion.OnClientSelectedIndexChanged">
          <a class="xref" href="C1.Web.Mvc.Accordion.OnClientSelectedIndexChanged.html#C1_Web_Mvc_Accordion_OnClientSelectedIndexChanged">OnClientSelectedIndexChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the value of the selectedIndex property changes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Accordion_Panes" data-uid="C1.Web.Mvc.Accordion.Panes">
          <a class="xref" href="C1.Web.Mvc.Accordion.Panes.html#C1_Web_Mvc_Accordion_Panes">Panes</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the collection of AccordionPane objects whose header and content properties determine the content of the Accordion control.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Accordion_SelectedIndex" data-uid="C1.Web.Mvc.Accordion.SelectedIndex">
          <a class="xref" href="C1.Web.Mvc.Accordion.SelectedIndex.html#C1_Web_Mvc_Accordion_SelectedIndex">SelectedIndex</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the index of the currently selected (active) pane.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Accordion_ShowIcons" data-uid="C1.Web.Mvc.Accordion.ShowIcons">
          <a class="xref" href="C1.Web.Mvc.Accordion.ShowIcons.html#C1_Web_Mvc_Accordion_ShowIcons">ShowIcons</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that determines whether shows collapsed/expanded icons in the pane headers.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
