Xamarin Forms C# ListView Search
 Hello everyone,
    i want to make a search from ListView
    when i make filter by name i want suggestions appear in listview
    I tried to do this
    but not working for me !!
    i don't understand what is the problem..
Screenshot for the problem: https://i.stack.imgur.com/OaRas.jpg
Xamarin Forms C# ListView Search   
Hello everyone, i want to make a search from ListView when i make filter by name i want suggestions appear in listview I tried to do this but not working for me !! i don't understand what is the problem..
    Model> echeance.cs:
    ------------
    namespace Appz.Model
    {
        public class Echeance
        {
            [PrimaryKey, AutoIncrement]
            public int ChkId { get; set; }
            public string ChkChoise { get; set; }
            [MaxLength(50)]
            public string ChkNumber { get; set; }
            public string ChkAmount { get; set; }
            [MaxLength(50)]
            public string BeneficiaryName { get; set; }
            public string AgencyType { get; set; }
            public DateTime ChkDueDate { get; set; }
            public DateTime ChkReleaseDate { get; set; }
            public string ChkImage { get; set; }
        }
    }
    EcheanceView.Xaml:
    -----------------
    <?xml version="1.0" encoding="UTF-8"?>
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                  xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" 
        ios:Page.UseSafeArea="true"
                 x:Class="Appz.View.EcheanceView">
        <ContentPage.Content>
            <StackLayout Padding="10,0,10,0">
                <SearchBar TextChanged="Handle_TextChanged"></SearchBar>
                <ListView  ItemsSource="{Binding EcheancesList}" IsPullToRefreshEnabled="True"  x:Name="ListEcheances" HasUnevenRows="true" SeparatorVisibility="Default" ItemTapped="OnItemSelected">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <ViewCell>
                                <StackLayout Orientation="Horizontal">
                                    <Image Source="{Binding ChkImage}" HeightRequest="50" WidthRequest="50"  />
                                    <StackLayout HorizontalOptions="StartAndExpand">
                                        <Label Text="{Binding BeneficiaryName}"
                                           FontAttributes="Bold" />
                                        <Label Text="{Binding AgencyType}"
                                           TextColor="Gray" />
                                    </StackLayout>
                                    <Button Text="Follow Me"
                                        BorderColor="Silver"
                                       FontSize="Small"
                                       TextColor="White"
                                       BackgroundColor="#3399ff"
                                       VerticalOptions="Center"
                                      />
                                </StackLayout>
                            </ViewCell>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </StackLayout>
        </ContentPage.Content>
    </ContentPage>
    EcheanceView.cs:
    ---------------
    void Handle_TextChanged(object sender, Xamarin.Forms.TextChangedEventArgs e)
            {
                using (SQLiteConnection conn = new SQLiteConnection(App.DatabaseLocation))
                {               
                    var echeances = conn.Table<Echeance>().ToList();
                    //ListEcheances.ItemsSource = echeances;
                    if (string.IsNullOrWhiteSpace(e.NewTextValue))
                        ListEcheances.ItemsSource = echeances;
                    else
                        ListEcheances.ItemsSource = echeances.Where(i => i.BeneficiaryName.Contains(e.NewTextValue));
                    ListEcheances.EndRefresh();
                }                    
            }
someone help me please Thanks in advance !!!
 
     
    