sflistview

Hi,
My code is below but when change the language then sflistview does not change the flowdirection.please help me to change the flow dirction in english left to right and arebic right to left or language change then scrolling dirction also change.
 <Grid Grid.Row="6" VerticalOptions="Start" Padding="0,10,0,10" Margin="0" RowSpacing="0" ColumnSpacing="0" HorizontalOptions="StartAndExpand" >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        
                        <ActivityIndicator  HorizontalOptions="Center"
   IsRunning="True"
   IsVisible="{Binding IsBusy}" Grid.Row="0" HeightRequest="50" WidthRequest="50"/>
                        <listView:SfListView HeightRequest="270" ItemSize="280" 
                         ItemsSource="{Binding HotelBannerImagesList}"  
                         Orientation="Horizontal" Grid.Row="0" ItemSpacing="10" IsScrollBarVisible="False" FlowDirection="RightToLeft">

                            <listView:SfListView.ItemTemplate>
                                <DataTemplate>
                                    <Frame  CornerRadius="5"  BorderColor="#dddddd" BackgroundColor="#f7f7f7" Padding="0" Margin="2" WidthRequest="300" HeightRequest="270" HasShadow="True" >
                                        <Grid RowSpacing="0" ColumnSpacing="0" Margin="0" Padding="0">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"></RowDefinition>
                                                <RowDefinition Height="Auto"></RowDefinition>
                                            </Grid.RowDefinitions>
                                            <ffimageloading:CachedImage Source="{Binding CityImage}" Grid.Row="0"  HeightRequest="180" Aspect="AspectFill"></ffimageloading:CachedImage>
                                            <Label Text="{Binding CityName}" Grid.Row="1" Margin="16,18,18,19"  FontSize="16" TextColor="#666666" FontFamily="{Binding BoldFont}"></Label>
                                        </Grid>
                                    </Frame>
                                </DataTemplate>
                            </listView:SfListView.ItemTemplate>
                        </listView:SfListView>

                    </Grid>
Thanks

5 Replies

SS SaiGanesh Sakthivel Syncfusion Team April 23, 2020 02:38 PM UTC

Hi Yogita, 
 
Thank you for the contacting Syncfusion support. 
 
We have checked the reported query “How to change the Flow Direction” from our end. We would like to inform that you can achieve your requirement by setting FlowDirection property to LeftToRight in SfListView. We would We have prepared the sample for your requirement and attached in the following link for your reference. 
 
 
Please refer to the following UG Link 
 
We hope this helps. Please let us know if you need any further assistance. 
 
Regards, 
SaiGanesh Sakthivel


YO Yogita April 23, 2020 05:10 PM UTC

Hi, 
My list flow direction in RTL but first item show in screen and all other came from scrolling but here is problem last element show screen so please help me to solve this problem. 

Thanks


SS SaiGanesh Sakthivel Syncfusion Team April 24, 2020 01:27 PM UTC

Hi Yogita, 
 
Thank you for your update, 
 
But we are not clear about your requirement. It will be helpful, if you could modify our sample to replicate the issue with following details: 
 
·       Issue replicated video or screenshot.  
·       Modify the Xaml page and view model class.  
·       Issue replicate the version of Xamarin form and Syncfusion version  
·       Specify the issue replicated the platforms  
 
Regards, 
SaiGanesh Sakthivel


YO Yogita May 6, 2020 10:19 AM UTC

Hi SaiGanesh Sakthivel,

As I have mentioned earlier that I am using SfListView with horizontal orientation.my app supports arabic and English language .
In case of Arabic flow direction I have given as right to left my list is reversed but scrolling direction is same as left to right Can u please help me out for same.
its very urgent !!!!


Regards,
Renu 


CS Chandrasekar Sampathkumar Syncfusion Team May 7, 2020 05:20 PM UTC

Hi Renu, 
Sorry for the inconvenience caused. 
We can reproduce the reported issue on our side. We like to let you know that you can achieve your requirement by setting the FlowDirection to the ContentPage in which ListView is used. We suggest you to change the FlowDirection of the ContentPage in the function where the language is changed. Please refer the following code snippet for more reference, 
C#: We have Changed the FlowDirection of ContentPage on Button Click.  
namespace ListViewXamarin 
{ 
    public partial class MainPage : ContentPage 
    { 
        public MainPage() 
        { 
            InitializeComponent(); 
        } 
 
        private void Button_Clicked(object sender, EventArgs e) 
        { 
            Device.BeginInvokeOnMainThread(() => 
            { 
                if (this.FlowDirection == FlowDirection.RightToLeft) //Changing to LTR 
                { 
                    this.FlowDirection = FlowDirection.LeftToRight; 
                } 
                else //Changing to RTL 
                { 
                    this.FlowDirection = FlowDirection.RightToLeft; 
                } 
            }); 
        } 
    }     
} 
We have prepared a sample based on your requirement and you can download the same using the following link, 
Sample Link: SfListViewSample 
Video: VideoSample 
Please let us know if you need further assistance. 
Regards, 
Chandrasekar Sampathkumar 


Loader.
Up arrow icon