HappyCoding
HappyCoding

Reputation: 661

What difference does it make if I use the SearchBar control versus the Entry control to search a ListView?

Regarding Xamarin.Forms, I've been reviewing the Entry control documentation along withe the SearchBar control documentation. After reviewing the documentation for both, they appear to be similar.

What difference does it make if I use the SearchBar control versus the Entry control to search a ListView?

Upvotes: 1

Views: 325

Answers (2)

pinedax
pinedax

Reputation: 9356

The Entry when rendered is just a Textbox, using this for search is possible but you will need to manually add a search button (if needed), cancel mechanism and attach yourself to the events to make the search. In the other hand using the SearchBar all this is already part of the control, out of the box for you.

If you don't need this extra functionality or you don't mind having to rewrite it you can use the Entry otherwise go with the SearchBar.

Upvotes: 0

hamalaiv
hamalaiv

Reputation: 858

I think they are functionally similar but the key difference in SearchBar is that you get different visualization and keyboard at least on iOS and Android. The Enter button has a custom icon or text and there is an icon in the entry field. Images of different devices can be found here. You can also see images of SearchBar on Android here:

Android SearchBar Android SearchBar keyboard

Upvotes: 1

Related Questions