sfexpander does not expand all the way

I am using an SfExpander with lots of data displayed inside it. It is all contained within 2 Grids but some of the rows are quite variable in height - depending on what data comes in. When I expand an entry, I can not always scroll to the end of the complete entry.
In searching for an answer, I came across the following site:

https://www.syncfusion.com/forums/154878/scroll-view-inside-the-sfexpander-is-not-scrollable

It uses a ScrollView and claims that the size will get adjusted to meet the Expander's requirements. I tried a HeightRequest of 100 as shown in the "solution". It only gave me 100. Period. Then I tried a HeightRequest of 2000. It also seemed to give me exactly what I asked for : 2000. This suggested solution does not work for me.

What other suggestions do you have that would force the Expander to expand completely?

Thanks!

3 Replies 1 reply marked as answer

LN Lakshmi Natarajan Syncfusion Team April 13, 2021 07:05 AM UTC

Hi Will, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “sfexpander does not expand all the way” from our side. We would like to inform you that you can bring the entire item into view when expanding using the ScrollView.ScrollToAsync method. Pleas refer to the following code snippets for more reference, 
 
Hook the SfExpander.Expanded event to bring the entire item into view. 
Expander1.Expanded += SfExpander_Expanded; 
 
private void SfExpander_Expanded(object sender, Syncfusion.XForms.Expander.ExpandedAndCollapsedEventArgs e) 
{ 
    ScrollView.ScrollToAsync((sender as SfExpander), ScrollToPosition.MakeVisible, false); 
} 
 
We have prepared a sample and attached in the following link, 
 
Also, the SfExpander supports to dynamically resize based on the size using the DynamicSizeMode property to adjust the content size based on the entry text. Please refer to our online documentation regarding the same, 
 
Please refer to the following documentation to bring the entire expander when loaded in the ListView, 
 
Please let us know if you need further assistance. 
 
Regards, 
Lakshmi Natarajan 


Marked as answer

WA Will Autio April 14, 2021 03:40 PM UTC

Hello Lakshmi Natarajan,

This link that you provided, and the associated example, helped me solve the problem:

So, a thought that the experience brought to mind is "Maybe SF could include ExtendedExpander as a default functionality within the Expander. That way, Expander would just work for apps like mine."

Thanks!
Will


LN Lakshmi Natarajan Syncfusion Team April 15, 2021 12:06 PM UTC

Hi Will, 
 
Thank you for the update. 
 
We would like to inform you that the SfExpander is a single view control not a templated control and we are not handling the scrolling in source level. So, when expanding the expander, it is recommended to handle the scrolling in sample level itself, because the scrolling of the view is handled by ScrollView in the sample level.  
 
Please let us know if you need further assistance. As always we are happy to help you out. 
 
Lakshmi Natarajan 
 


Loader.
Up arrow icon