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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Accordion view expand accordion from vm

Thread ID:





151128 Jan 31,2020 02:18 PM UTC Feb 4,2020 04:45 AM UTC Xamarin.Forms 3
Tags: SfAccordion
Reza Mohamed
Asked On January 31, 2020 02:18 PM UTC

I have an accordion that i am populating data from a viewmodel. How would i expand one accordion from the viewmodel? 

As an example, i am populating an accordion with weekly data sunday - saturday, I want to expand the accordion to whatever day today is, say Tuesday.

Lakshmi Natarajan [Syncfusion]
Replied On February 3, 2020 10:11 AM UTC

Hi Reza, 
Thank you for using Syncfusion products. 
We have checked the reported query from our end. We would like to let you know that you can expand one AccordionItem based on IsExpanded property by using ExpandMode as Single when loaded. Please find the following code snippet for more reference, 
<accordion:SfAccordion x:Name="accordion" 
                               BindableLayout.ItemsSource="{Binding Info}"  
                    <accordion:AccordionItem IsExpanded="{Binding IsExpanded}"> 
                                <Label Grid.Row="0" 
                                        Text="{Binding Name}" 
                                        FontSize="20" /> 
                            <Grid HeightRequest="50"> 
                                <Label Text="{Binding Description}"/> 
We have prepared a sample based on your requirement. Please find the sample in the following link, 
You can also refer our online user guide documentation regarding the same by the following link, 
We hope this helps. Please let us know if you need any further assistance. 
Lakshmi Natarajan 

Reza Mohamed
Replied On February 4, 2020 04:05 AM UTC

Thank you! Exactly what I was needing help with.

Lakshmi Natarajan [Syncfusion]
Replied On February 4, 2020 04:45 AM UTC

Hi Reza, 
Thanks for the update. 
We are glad that reported issue have been resolved at your end. Please let us know if you need any further update. As always we are happy to help you out. 
Lakshmi Natarajan 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon