Wordwrap in swipe templates

Hello,

Is there a way to avoid word wrapping of labels in the swipetemplate in an sflistview? I want it to look like an image inside of the swipetemplate how it gets smaller as the swipe is smaller. Right now, my label will start wrapping the word as the swipe gets smaller.

Thanks,

David


1 Reply 1 reply marked as answer

LN Lakshmi Natarajan Syncfusion Team April 20, 2021 08:56 AM UTC

Hi David, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Wordwrap in swipe templates” from our side. We would like to inform that you can overcome the reported scenario by using the LineBreakMode as NoWrap for the label to avoid wrapping the text.  
 
Please refer to the following documentation regarding LineBreakMode, 
 
<sync:SfListView.RightSwipeTemplate> 
    <DataTemplate x:Name="RightSwipeTemplate"> 
        <Grid BackgroundColor="#DC595F" HorizontalOptions="Fill" VerticalOptions="Fill"> 
            <Grid VerticalOptions="Center" HorizontalOptions="Center"> 
                <Image Grid.Column="0" 
    Grid.Row="0" 
    HeightRequest="35" 
    WidthRequest="35" 
    BackgroundColor="Transparent" 
    BindingContextChanged="rightImage_BindingContextChanged" 
    Source="Delete.png" /> 
                <Label Text="Delete" LineBreakMode="NoWrap" Grid.Row="1"/> 
            </Grid> 
        </Grid> 
    </DataTemplate> 
</sync:SfListView.RightSwipeTemplate> 
 
Also, the SfListView supports Material design for swiping, which allows only the ItemTemplate swipe over the SwipeTemplate. In this scenario, the SwipeView does not translate and the text will not wrap.  
 
Please refer to the following documentation regarding material visual in Xamarin.Forms, 
 
Please let us know if you need further assistance. 
 
Regards, 
Lakshmi Natarajan 


Marked as answer
Loader.
Up arrow icon