This project has moved and is read-only. For the latest updates, please go here.

Accordion not expanding its AccordionItem on instanciation


I'm using an Accordion with its AccordionItems set in the XAML. The selection of the AccordionItem is done in the code-behind to have the correct AccordionItem selected (opened) when the control is shown.
Unfortunately, it seems that there are race conditions going on because although I managed to make it work, adding another control to the main UserControl made it break. Now the AccordionItem is selected but doesn't open anymore (the little arrow points down and the colour is focused).
Selecting another AccordionItem by click fixes it and setting the SelectionSequence to CollapseBeforeExpand does as well.
I tried to make a test project showing the issue but couldn't easily. Maybe it's because I have DatePicker controls in the Accordion that doesn't work.
I'll try to create a test project again soon.
Is there anything I can do to make it work as I want to?

file attachments


R4cOOn wrote Feb 1, 2010 at 8:52 AM

Attached is a project that shows the issue.
I initialize the DatePicker in the top-to-bottom order and then I select the 1st item. The last one is still selected though.

wrote Feb 1, 2010 at 8:52 AM

wrote May 7, 2010 at 9:09 AM

wrote Apr 5, 2012 at 2:41 AM

wrote Feb 22, 2013 at 2:52 AM

sreelekha wrote Jan 7, 2015 at 6:10 PM

Hi, if you found solution for which you have faced above.
Please give me the solution