SfListView's line separator does not show in some items
Hello Team!!!
I have a problem with SfListView component.
Now i am using [Syncfusion.Maui.Inputs] package version :24.1.4
My problem is like this .
If there are more than 10 items and above in SfListView ,sometime line separators does not appear between some items.
Are there any suggestion or advice to fix this problem?
I have been attached sample code and UI image of my issue .
Please check and confirm .
Best and regards.
Attachment: sfListView_issue_9b29d34b.zip
Hi KyawWin ,
We have prepared a sample based on the code snippet you shared. In your code, seems you are using StackLayout (with Height=1) as line separator. so we used same in our sample. However, the line separator does not appear between items because the default background of StackLayout is transparent. By setting a Background (Gray color) for the StackLayout, the line separator becomes visible.
From the Image1 you shared, it appears that the line separator is visible. If you are using a StackLayout as the line separator as we mentioned above, could you please let us know how you achieved this without using a background for the StackLayout? Please refer to the attached sample and let us know if we missed any customization to replicate the issue.
Regards,
Sowntharya Jayamoorthy
Attachment: Listview_d68dd969.zip
Hi Sowntharya 、
Thanks for checking my problem,
Sorry for not showing source with background color line.
I will share more details with my source.
I think it doesn't concern with line seperator.
It will be conern with item height but I change and try AutoFitMode "Height" to"DynamicHeight" ,this issue still happened.
Conditions to reproduce this issue.
=>There are more than 20 items in sflistview
=>There are various height of item in listview like as below
height of item 1,3,5 is 80
height of item 2,4,6 is 60
***When i used CachingStrategy="CreateNewTemplate" ,this issue doesn't happened.
But showing very slowly when i scroll listview.***
Are there any suggestion to fix this problem?
Please check and confirm.
Best and regards.
Attachment: sfListView_issue2xlsx_ca7ddb1d.zip
Hi KyawWin ,
We have tested with a simple ListView sample using the code snippets you shared. Unfortunately, we were unable to replicate the reported issue (Sample attached).
When using Autofit mode as Height or DynamicHeight, the ListView item height is calculated based on the item content. We suspect that the item template is not returning the measured size correctly.
As a workaround, could you kindly try using Grid element instead of StackLayout and use BoxView as a line separator, as shown in the code snippet below?
If you are still encountering the issue, could you please provide the following details:
- Code implementation for the
View: Applicationview used in ItemTemplate. - Syncfusion package version & MAUI package version.
- Device details of the reported issue.
This information will be very helpful for us in further investigating the reported issue.
Code snippet:
|
<syncfusion:SfListView.ItemTemplate> <DataTemplate> <ViewCell> <Grid RowDefinitions="*,*"> <views: Application> <BoxView HeightRequest="1" Background="Gray" Grid.Row="1"/> </Grid> </ViewCell> </DataTemplate> </syncfusion:SfListView.ItemTemplate> |
Regards,
Sowntharya J.
Attachment: ListView1_(2)_9ea88ecc.zip
- 3 Replies
- 2 Participants
-
KY KyawWin
- Dec 10, 2024 07:17 AM UTC
- Jan 29, 2025 01:55 PM UTC