Because the accordion is comprised of block-level elements, by default its width fills the available horizontal space.
To fill the vertical space allocated by its container, set the AccordionOptions.FillSpace property to true, and the script will automatically set the dimensions of the accordion to the height of its parent container. The accordion will also resize with its container if the container is resizable.
In order to set the AccordionOptions.FillSpace value that you can use the Options() method like below:
Ajax.Dna().Accordion("ExampleAccordion")
.Options(opts=>{
opts.FillSpace=true;
})
// views specifiation
.Render();