xamarin.forms - Best practice in Xamarin Forms to perform a filter search -


i need perform filter search dynamic fields , not sure best way this.

we have lot of documents different fields , these used filter search.

can point me in right direction?

example of looking do.

if using mvvm pattern. here steps:

  • declare observablecollection<itemtype> each of drop down lists in viewmodel.
  • create selectedtype1, selectedtype2 etc. properties selected values corresponding each drop down list.
  • attach selectionchanged , textchanged method handlers each drop down lists in view updates corresponding selection properties in viewmodel.
  • delcare observablecollection<searchresulttype> searchresults in viewmodel holds search results given search.
  • declare searchcommand property in viewmodel executes search method.
  • declare search method makes web request call or local database search query depending on requirement. search method has access drop down selections/text typed user.
  • insert results obtained in search method searchresults collection.
  • bind searchresults collection listview.itemssource in view.
  • bind searchcommand search action button (top right button in view).

happy coding!


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -