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

Auto height doesn't working when I using sfChips in items

Thread ID:





142451 Feb 5,2019 07:02 AM UTC Feb 6,2019 12:15 PM UTC Xamarin.Forms 3
Tags: SfListView
Asked On February 5, 2019 07:02 AM UTC

I have sfListView where I add shChipsGroup in items.
 <xForms:SfListView ItemsSource="{Binding Items}" AutoFitMode="Height">
                        <Grid RowSpacing="0">
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="1" />
                            <Grid RowSpacing="0" Padding="8,0,8,10">
                                    <RowDefinition Height="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="10" />
                                <StackLayout Orientation="Vertical" VerticalOptions="StartGrid.Row="0Grid.Column="0">
Grid.Row="1Text="{Binding Name}"/>
                                    <Label Grid.Row="1Text="{Binding CategoryName}" />
                                    <Label Grid.Row="1Text="{Binding TypeName}"/> 
                                    <Label Grid.Row="1Text="{Binding Description}"/>
                                    <Label Grid.Row="1Text="{Binding Price}"/>
                                <StackLayout Orientation="VerticalVerticalOptions="Start  Grid.Row="1Grid.ColumnSpan="2"> 
                                    <buttons:SfChipGroup Grid.Row="1"
                                                     ItemsSource="{Binding Ingredients}"
                                        <FlexLayout HorizontalOptions="Start"
                            <BoxView Grid.Row="2"
                                     BackgroundColor="#CECECE" />

When in FlexLayout I set Wrap="Wrap" my each row height has calculated is not correct. 

But when I change Wrap to "NoWrap" - the height is correct:

Can you help me?

Replied On February 5, 2019 11:57 AM UTC

The same problem in iOS and Android devices.
I tried add 
Loaded="listView_Loaded" to ListView where I called listView.RefreshListViewItem(), but it doesn't help me.

Gnana Priya Namasivayam [Syncfusion]
Replied On February 5, 2019 04:32 PM UTC

Hi Sergey, 
Thanks for using Syncfusion product. 
We have checked reported the query from our side and could able to reproduce the issue. We are currently validating the reported query and will update further details on February 5, 2019. We will appreciate your patience until then. 
Gnana Priya N 

Gnana Priya Namasivayam [Syncfusion]
Replied On February 6, 2019 12:15 PM UTC

Hi Sergey, 
We have checked the reported query from our side. We would like to know that default ItemHeight value of SfChip is double.NAN. So, we need to use ItemHeight for the SfChipGroup. So that, it get adjusted correctly to the view inside the ListView ItemTemplate. We have attached the modified sample for your reference, please find the sample from following. 
   <buttons:SfChipGroup Grid.Row="1" ItemHeight="40" ItemsSource="{Binding Employees}" 
Gnana Priya N 


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