none
set accordionitem height as auto

    Question

  • Hi there,

    I have multiple accordionitems within an accordion, and when I expand multiple items, I can't fully view contents of every item. The expanded items kind of share the space and one overlaps part of another. And since these accordionitems are being added from the code, I don't know how to set their sizes to be auto. SOS!

    Friday, August 27, 2010 11:33 AM

Answers

  • Do you have it placed inside a Grid?  If so, did you try setting the height of that Grid row to Auto? 

    Monday, August 30, 2010 6:59 PM

All replies

  • Hi Dgman,

    As a convenience to our community members, would you please share us more details?  For example, the code segment.

    Best regards,

    Jonathan 

    Monday, August 30, 2010 7:46 AM
  •  But of course.

    foreach(var student in OurClass)

    {

       item = new AccordionItem();

       item.Header = student.ID;

       item.Content = String.Format("FirstName:{0}\n LastName:{1}", student.first, student.last);

    this.myAccordion.Add(item);

    }

     

    and all I have on the XAML side is,

    <toolkit:Accordion x:Name=myAccordion SelectionMode="ZeroOrMore" Height="Auto">

    </toolkit:Accordion>

     

     

    Monday, August 30, 2010 2:08 PM
  • Do you have it placed inside a Grid?  If so, did you try setting the height of that Grid row to Auto? 

    Monday, August 30, 2010 6:59 PM
  • oh man that could have been it. Let me try that. 

    Tuesday, August 31, 2010 8:01 AM