any way set sflistview Horizontal AutoFitMode=width

  <sync:SfListView  Margin="5"  AutoFitMode="Height" Orientation="Horizontal">
                    <sync:SfListView.ItemTemplate>
                        <DataTemplate>
                            <Label Text="{Binding}" Margin="10,0" LineBreakMode="NoWrap" HorizontalOptions="FillAndExpand" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"/>
                        </DataTemplate>
                    </sync:SfListView.ItemTemplate>
</sync:SfListView>

i wan't using AutoFitMode="width",becaus label text incomplete display

1 Reply

MK Muthu Kumaran Gnanavinayagam Syncfusion Team May 3, 2018 03:11 PM UTC

Hi Guitarpark, 
 
We have checked the reported query “Need for value ‘Width’ for AutoFitMode property in SfListView” and referred the attached code snippets from our side. We would like to let you know that there is no enum value ‘Width’ available for AutoFitMode property in SfListView and when set AutoFitMode value as ‘Height’, the SfListView will automatically calculate its size based on the elements inside ItemTemplate and layout in the View accordingly.So even when there was a large sized text, the items will not be shrinked and extends upto the end of the text. As you have mentioned that the ‘text display is incomplete’, we suspect is it due to set Margin value for Label element. Instead of setting Margin for label element, we suggest you to use ItemSpacing property in SfListView. It is used to create seperation among list items. 
 
Please let us know if you require further assistance. 
 
Regards, 
G.Muthu kumaran. 


Loader.
Up arrow icon