We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfExpander / SfAccordion only works first time view displays

We are hitting an issue with both the SfAccordion and SfExpander (on all platforms).

Both happen in the same situation: They display and work fine the first time the view is loaded. Then when the view is navigated away from and then we go back into the view it does not work. In the case of SfAccordion it just does not appear, but the SfExpander gives an explicit error: see below:

Exception thrown: 'System.InvalidOperationException' in System.ObjectModel.dll
Exception thrown: 'System.Exception' in Syncfusion.Expander.XForms.UWP.dll
WinRT information: Element is already the child of another element.
An exception of type 'System.Exception' occurred in Syncfusion.Expander.XForms.UWP.dll but was not handled in user code
WinRT information: Element is already the child of another element.
No installed components were detected.

Element is already the child of another element.

This happens when using the most basic example of these components copied from the SyncFusion documentation and pasted into our 'ContentView'. The application does dynamically load the 'ContentView' and we have in our application a way that you can navigate between these using a previous and next button. But this is all fairly standard Xamarin code and all other components / libraries including all other SyncFusion components are working fine so we do believe this could be a bug with SfExpander / SfAccordion. 

Perhaps there is a workaround we can apply to re-initialise the components when the view is loaded? If not can this be investigated further and fixed?

1 Reply

LN Lakshmi Natarajan Syncfusion Team December 24, 2019 04:04 PM UTC

Hi Kevin, 
Thank you for contacting Syncfusion support. 
We would like to let you know that we have fixed the issue “SfExpander / SfAccordion only works first time view displays” and included the issue fix in our latest Weekly Nuget release update version which is available for download (nuget.org). 
Please update the latest version and let us know if you still facing the same issue. If not, please provide the sample based on your scenario and revert us back. 
Lakshmi Natarajan 

Live Chat Icon For mobile
Up arrow icon