Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Searching in a list view

$
0
0

Hi

I am trying to create a view using SearchBar in a view using code. But I am not able see it on the screen and it breaks.
Can anybody help me with this.

This is the one I am using.
SearchBar searchBar = new SearchBar();
searchBar.Placeholder = "search";
searchBar.BackgroundColor = Color.White;
searchBar.HorizontalOptions = LayoutOptions.CenterAndExpand;
searchBar.WidthRequest = 300;
searchBar.VerticalOptions = LayoutOptions.CenterAndExpand;
searchBar.IsVisible = true;

        layout.Children.Add(searchBar);

        Content = layout;

Thanks


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>