Unable to scroll using arrow keys

I have an SfListView control that I am unable to select by scrolling up and down using the arrow keys. I have to move my mouse instead to select the item. Is there a setting that I am missing?


5 Replies

SY Suthi Yuvaraj Syncfusion Team July 12, 2022 09:03 AM UTC

Hi Sree Sundaram,

 

We suggest to set the AllowKeyNavigation property to true to scroll using arrow keys with selection. Please refer the attached code snippet for your reference.

 

Code snippet: 

<syncfusion:SfListView x:Name="listView"

                         AllowKeyboardNavigation="True"

                         SelectionGesture="Tap"

                         ItemsSource="{Binding MusicInfo}"

                         SelectionMode="Single"

                         ItemSpacing="3"

                         IsStickyHeader="True"

                         ItemSize="70">

 

 

 

Please refer the below user guide for Selection using KeyNavigation in SfListView.

UG Link: https://help.syncfusion.com/xamarin/listview/selection#key-navigation

 

Please let us know if you need further assistance.

 

Regards,

Suthi Yuvaraj.



SS Sree Sundaram July 17, 2022 01:14 AM UTC

Hello, the above solution does not work. I am still unable to scroll through the ListView



SY Suthi Yuvaraj Syncfusion Team July 18, 2022 03:12 PM UTC

Hi Sree Sundaram,

We have checked the reported issue in simple sample with latest version of our SfListView  control(version-20.2.0.38) and Xamarin.Forms(version-5.0.0.2478) , Scrolling using up and down arrow keys is working fine . We have attached a workable sample and output video for your reference.

Also, please modify the sample to the reported scenario and share the below details, which would be helpful for us to check on it and provide you with the solution as soon as possible.

  1. SfListView code snippets
  2. Repliciation Video
  3. Nuget Packages Version and
  4. Platform Details

Regards,

Suthi Yuvaraj


Attachment: Scrollarrow_52e7897c.zip


SS Sree Sundaram August 11, 2022 08:05 PM UTC

Here is the Nuget version:


    <PackageReference Include="Syncfusion.Xamarin.DocIO" Version="19.4.0.53" />

    <PackageReference Include="Syncfusion.Xamarin.Presentation" Version="19.4.0.53" />

    <PackageReference Include="Syncfusion.Xamarin.SfChart" Version="19.4.0.53" />

    <PackageReference Include="Syncfusion.Xamarin.SfListView" Version="19.4.0.53" />

    <PackageReference Include="Syncfusion.Xamarin.SfPopupLayout" Version="19.4.0.53" />



Here is the code snippet:

                        <syncfusion:SfListView AllowKeyboardNavigation="True" x:Name="lstProjectValueMetrics" WidthRequest="200"  HeightRequest="200">

<syncfusion:SfListView.RowDefinitions>
<RowDefinition Height="*"/>
</syncfusion:SfListView.RowDefinitions>
                            <syncfusion:SfListView.ItemTemplate>
                                    <DataTemplate>
                                        <ViewCell>
                                            <StackLayout Orientation="Horizontal" HorizontalOptions="Start">
                                                <StackLayout Padding="5" Orientation="Vertical" VerticalOptions="Start">
                                                    <Label Style="{StaticResource DefaultLabelSmallBoldStyle}" Text="{Binding DisplayName}"/>
                                                    <Label Style="{StaticResource DefaultLabelSmallStyle}" FontAttributes="Italic" Text="{Binding DisplayValue}"/>
                                                <!-- <Label Style="{StaticResource DefaultLabelSmallStyle}" FontAttributes="Italic" Text="{Binding MetricValue, StringFormat='{0:0,0.00}'}"/> -->
                                            </StackLayout>
                                            </StackLayout>
                                        </ViewCell>
                                    </DataTemplate>
                                </syncfusion:SfListView.ItemTemplate>
                            </syncfusion:SfListView>

It does not work both on UWP as well as in Android



SY Suthi Yuvaraj Syncfusion Team August 12, 2022 02:08 PM UTC

Hi Sree Sundram,


We regret let you know that we are unable to replicate the reported scenario on our end with provided code snippet and nuget version. We have prepared a simple sample with provided code snippet and attached here for your reference. Please have a look at this sample and let us know if missed any customization you have done in your application or revert us with modified sample or full XAML and C# code snippets related to SfListView to replicate the reported issue on our end in UWP platform. Please share details of device that you have tested and
Xamarin.Forms version It will be more helpful for us to provide timely solution.


Regards,

Suthi Yuvaraj


Loader.
Up arrow icon