I have an Accordion control to which I have added a datagrid.
The problem is that I cannot set the header of the accordian item that displays the Datagrid.
I can only set the header on the object of the class AccordionItem and not when the Datagrid is added to the Accordion.
I also tried to add the Datagrid to the Accordionitem object that was added to the Accordion but could not succeed. I can’t figure out how to add Datagrid to accordonitem object.
Appreciate your help.
Thanks,
I
An
Accordionhas onlyAccordionItemchildren. You should set the child explicitly to theAccordionlike that (example of anAccordionwith aStackPanelas a child and a template for the header):So in your case it would be something like:
Hope that makes sense to you.