DynamicSizeMode="Content" Causes app freeze on iOS

I am using an sfAccordion in my app. If I set size to dynamically expand, I can expand it once, and then as soon as I collapse it, the app freezes. If I leave it expanded the app remains usable.

If I remove DynamicSizeMode="Content", I can expand and collapse the accordion as many times as I like and the app does not freeze.

The issue only affects iOS and does not occur on Android.

Here is a code sample [EDIT: Not sure why the closing tag symbols get stripped out at the end, i.e. < / , but they are there in the original code]

<sfa:SfAccordion x:Name="AttachmentAccordian"
                 IsVisible="{Binding HasAttachments}"
                 ExpandMode="SingleOrNone"
DynamicSizeMode="Content">
     <sfa:SfAccordion.Items>
         <sfa:AccordionItem>
            <sfa:AccordionItem.Header>
                <badge:SfBadgeView HorizontalOptions="Start"
                                   VerticalOptions="Center"
                                   BadgeText="{Binding AttachmentCount}">
                     <badge:SfBadgeView.Content>
                          <StackLayout Orientation="Horizontal"
                                       HeightRequest="35"
                                       WidthRequest="175"
                                       HorizontalOptions="StartAndExpand"
                                       Padding="10,0">
                              <Label FontFamily="{StaticResource MaterialFontFamily}"
                                     FontSize="Large"
                                     InputTransparent="True"
                                     Rotation="45"
                                     Text="{Binding PaperclipIcon, Converter={StaticResource NameToIcon}}" />
                              <Label Text="New Attachments"/>
                          StackLayout>
                      badge:SfBadgeView.Content>
                  <badge:SfBadgeView.BadgeSettings>
                   <badge:BadgeSetting BadgeType="Error" Offset="-5,10"/>
                  badge:SfBadgeView.BadgeSettings>
              badge:SfBadgeView>
          sfa:AccordionItem.Header>
          <sfa:AccordionItem.Content>
              <StackLayout MinimumHeightRequest="30" Padding="5,0">
                   <FlexLayout Direction="Row"
                               Wrap="Wrap"
                               BindableLayout.ItemsSource="{Binding PhotoAttachments}"
                               VerticalOptions="FillAndExpand"
                               HorizontalOptions="FillAndExpand"
                               JustifyContent="Start"
                               AlignItems="Start"
                               AlignContent="Start"
                               x:Name="PhotoAttachmentFlex">
                       <BindableLayout.ItemTemplate>
                           <DataTemplate>
                               <StackLayout Orientation="Horizontal"
                                            BackgroundColor="LightGray"
                                            Margin="5,0"
                                            Padding="2">
                                    <Label FontFamily="{StaticResource MaterialFontFamily}"
                                           FontSize="Large"
                                           TextColor="Black"
                                           Text="{Binding Source={x:Reference myPage}, Path=BindingContext.ImageIcon, Converter={StaticResource NameToIcon}}" />
                                    <Label Text="{Binding}"
                                           TextColor="Black"/>
                                 StackLayout>
                                   DataTemplate>
                              BindableLayout.ItemTemplate>
                         FlexLayout>
                    StackLayout>
               sfa:AccordionItem.Content>
          sfa:AccordionItem>
     sfa:SfAccordion.Items>
>

1 Reply 1 reply marked as answer

LN Lakshmi Natarajan Syncfusion Team January 15, 2021 11:21 AM UTC

Hi Matt, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “DynamicSizeMode="Content" Causes app freeze on iOS” from our side. We would like to inform you that we are unable to reproduce the issue at our side. We have attached the tested sample and video in the following link, 
 
Additional information: 
Tested device: iOS – iPhone 12 Pro Max 14.1 
SfListView version: 18.4.0.34 
Xamarin Forms: 5.0.0.1874 
Xamarin: 16.7.000.456 
Xamarin Designer: 16.7.0.495 
Xamarin Templates: 16.7.85 
Xamarin.iOS: 14.1 
Xcode: 12.1 
  
Please check our sample and let us know if you still facing the same issue? if not, please modify our sample and revert us back with the following details which would be helpful for us to check on it and provide you the solution as soon as possible, 
  • Share the stack trace if any
  • Share the issue reproducible video
  • Share tested device
  • Share Syncfusion and Xamarin.Forms version
 
Lakshmi Natarajan 
 


Marked as answer
Loader.
Up arrow icon