I'm trying to modify the Accordion container so that it resizes itself according to the selected child. My Accordion will only ever contain a ToggleButtonBar or another custom control I created myself. Whenever the selectedIndex of the Accordion changes, I want to get the height of the newly selected child, add it to the combined height of all the Accordion 'tabs', and make that the new height of the Accordion.
My problem is that the child of an accordion reports is size as being that of the Accordion. So for my custom control, I simply add up the contents and determining it's minimum size - which is working just fine - but I can't seem to find a way to get the minimum size of the ToggleButtonBar (that is, the sum of the heights of all the buttons). I know the height of each button, so I was hoping to find a way to just ask for the number of buttons, and multiply that by the height - but the dataProvider returned is always blank.