Right hand edge of control in DataTemplate is truncated (Windows)

ListView defined as follows:

 <syncfusion:SfListView

     Margin="2"

     BackgroundColor="White"

     HorizontalOptions="FillAndExpand"

     ItemSize="150"

     ItemSpacing="0,0,10,0"

     ItemsSource="{Binding Books}"

     VerticalOptions="CenterAndExpand"

     Padding="0">


     <syncfusion:SfListView.ItemsLayout>

         <syncfusion:GridLayout SpanCount="4" />

     </syncfusion:SfListView.ItemsLayout>


     <syncfusion:SfListView.ItemTemplate>

         <DataTemplate>

             <Border

                 Margin="0,0,10,0"

                 Padding="0"

                 Stroke="Black"

                 StrokeShape="RoundRectangle 5"

                 StrokeThickness="3"

                 HorizontalOptions="Center">


If the right margin of the 'Border' is set to a value below the value for the right ItemSpacing, then the right edge of the border is clipped. To test, set the ItemSpacing="0,0,15,0". This now clips 5 from the right hand edge of the border. I have not tested on other platforms, this is on Windows.


2 Replies

AK Ananthalakshmi Kannan Syncfusion Team December 21, 2023 01:51 PM UTC

Hi Peter Mortley,

We have analyzed the reported query and we can able to replicate the issue. In GridLayout, ListViewItem is measured with incorrect width when setting left and right ItemSpacing and setting Margin for SfListView, So, content of ListViewItem is getting clipped in view. We have logged a bug report regarding the reported issue “ListViewItem is measured with incorrect width value when using Left and Right ItemSpacing in GridLayout”. We plan to address and fix this issue in the upcoming weekly NuGet release scheduled for January 9, 2024. We will notify you once it is released with the fix, and we appreciate your patience until then.

You can also track the status of the report using the following feedback Link: https://www.syncfusion.com/feedback/49451/listviewitem-is-measured-with-incorrect-width-value-when-using-left-and-right

Please note that the inclusion of this solution in the weekly release may be subject to change due to various factors, including QA checks and work reprioritization.



SY Suthi Yuvaraj Syncfusion Team January 3, 2024 02:50 PM UTC

Peter Mortley,

We glad to inform you that we have fixed the reported issue ListViewItem is measured with incorrect width value when using Left and Right ItemSpacing in GridLayout” and included the issue fix in our latest NuGet release update version 24.1.44 which is available for download (https://www.nuget.org/).  We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance. 


Loader.
Up arrow icon