SfAccordion ScrollY Property

Hello,

I am wondering if there is a way to access the ScrollY property when scrolling the SfAccordion. I set a PropertyChanging event for a ScrollView and I am able to see when the ScrollY changes. With the same implementation for the SfAccordion, it does not have a ScrollY property. Is there anyway to get access to this?

Thanks,

David


5 Replies 1 reply marked as answer

SS SaiGanesh Sakthivel Syncfusion Team March 29, 2021 12:14 PM UTC

Hi David,  
  
Thank you for contacting syncfusion support.

#Regarding SfAccordion ScrollY property
We would like to inform you that as per implementation of SfAccordion,
the accordion items are added in the scrollview internally in order to scroll the accordion when the more items added to the accordion. We would like to know the exact requirement to achieve with help of ScrollY property in SfAccordion which will helps us to provide the better solutions.
We also would suggest you to use the SfAccordion with SfListView from which you can get the scrollY position of listview.

KB: https://help.syncfusion.com/xamarin/listview/viewappearance#accordion-view
 

please let us know if you have any concern.

Regards,
SaiGanesh Sakthivel  
 



DB David Bauer March 29, 2021 06:12 PM UTC

Hello,

Thank you for your response. The reason for the ScrollY property is the following:

On iOS, I have a toolbar (this is under the navigation bar; it is just a stacklayout with a few functions) and an SfAccordion underneath the toolbar. I have large titles on iOS enabled so that when I scroll down my SfAccordion the title becomes small, when I scroll to the top of the accordion it becomes big again. The problem is that when you try to scroll past the top of the accordion, it pulls down the title past the toolbar. I want the toolbar to pull down along with it and not be covered up. When the scrollY property becomes negative, I can translate the toolbar down with the “bounce” of the accordions scrollview.

Is there a better way to achieve this functionality?

Thanks,

David



SS SaiGanesh Sakthivel Syncfusion Team March 30, 2021 12:00 PM UTC

Hi David,

Thank you for the update.

#Regarding SfAccordion ScrollY property 
 
We regret to let you know that as per implementation the requirement is not possible with SfAccordion alone. You can achieve your requirement by combining the SfAccordion with SfListView. We would like to inform you that we already have the KB article about ‘How to update the header height on scrolling in SfListView’ in our website. Please refer to the following KB link for your reference.   
   

We also would suggest you to use the SfAccordion with SfListView from which you can get the scrollY position of listview.  
 
   
   
We hope this helps. Please let us know if you have any concern.

Regards,
SaiGanesh Sakthivel  
 



DB David Bauer April 9, 2021 01:24 PM UTC

Hello,

Thank you for the solution. I have been able to get the scrollY property and obtain the functionality that I wanted. However, I do have 1 more issue. When the page first appears, the accordion takes about a second to show up. The way I have fixed this is by setting the HeightRequest of the accordion inside of the listview to something really big (like 10000). When I do this, it shows up immediately. The problem with this is that it is not dynamic to the accordions content and the listview will scroll a long way past the accordion. Is there a way to set the height of the accordion exactly to the content?

I have tried setting “DynamicSizeMode=”Content””, but this does not work.

Thanks,

David



SS SaiGanesh Sakthivel Syncfusion Team April 12, 2021 01:22 PM UTC

Hi David,

Thank you for the update.

#Regarding DynamicSizeMode=Content is not working
 
We regret to inform you that we could not replicate the reported scenario form our side. We have prepared the sample as per given information and we have checked the sample with AndriodX API 29 (RealMeX2 pro) device. We have attached the tested sample for your reference and you can download the same from the following location.   
    
 
Please check the sample and let us know if you still facing the same issue? If not, please modify our sample based on your scenario and revert us back with the following details,    
    
·         Share the issue replicated video. 
·         Share the syncfusion version and Xamarin form version used in sample. 
 
Regards,  
SaiGanesh Sakthivel 


Marked as answer
Loader.
Up arrow icon