Width of Swipe Column

I would like the width of my swipe right column to be only the size of the image that it contains.  as it is now, its width is half the width of the grid.

How would I go about doing that.

this is the Xaml for the part of the column

<sfgrid:SfDataGrid.RightSwipeTemplate>
                    <DataTemplate>
                        <Grid BackgroundColor="Red" WidthRequest="60" Grid.Column="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="60"></ColumnDefinition>
                            </Grid.ColumnDefinitions>

                            <Image Grid.Column="0"
                                       BackgroundColor="Transparent"
                                       BindingContextChanged="rightImage_BindingContextChanged"
                                       HorizontalOptions="CenterAndExpand"
                                       Source="TrashImage.png"/>

                        </Grid>
                    </DataTemplate>
                </sfgrid:SfDataGrid.RightSwipeTemplate>


1 Reply

AN Ashok N Syncfusion Team October 30, 2017 09:17 AM UTC

Hi Fred, 
 
Thanks for contacting Syncfusion support. 
 
You can able to set the swipe offset value using SfDataGrid.MaxSwipeOffset property. This property help as to restricted the swipe up to a certain point on the row. This MaxSwipeOffset value will be applied to both Right and Left swipe template.  
 
SfDataGrid.MaxSwipeOffset = “100” 
 
 
Regards, 
Ashok 


Loader.
Up arrow icon