protected void AddSearchHandler(string placeholder, SearchBoxVisibility visibility)
        {
            var searchHandler = new CustomSearchHandler();

            searchHandler.BackgroundColor         = Color.Orange;
            searchHandler.CancelButtonColor       = Color.Pink;
            searchHandler.TextColor               = Color.White;
            searchHandler.PlaceholderColor        = Color.Yellow;
            searchHandler.HorizontalTextAlignment = TextAlignment.Center;
            searchHandler.ShowsResults            = true;

            searchHandler.Keyboard = Keyboard.Numeric;

            searchHandler.FontFamily     = "ChalkboardSE-Regular";
            searchHandler.FontAttributes = FontAttributes.Bold;

            searchHandler.ClearIconName     = "Clear";
            searchHandler.ClearIconHelpText = "Clears the search field text";

            searchHandler.ClearPlaceholderName     = "Voice Search";
            searchHandler.ClearPlaceholderHelpText = "Start voice search";

            searchHandler.QueryIconName     = "Search";
            searchHandler.QueryIconHelpText = "Press to search app";

            searchHandler.Placeholder         = placeholder;
            searchHandler.SearchBoxVisibility = visibility;

            searchHandler.ClearPlaceholderEnabled = true;
            searchHandler.ClearPlaceholderIcon    = "mic.png";

            Shell.SetSearchHandler(this, searchHandler);
        }
Exemplo n.º 2
0
        private async void LoadPageEvent()
        {
            var response = await _restService.GetStrainsDataAsync(strainSourceData);

            NameofStrains = new List <WeedStrain>(response.WeedStrains.ToList());
            IsLoading     = false;
            IsVisible     = SearchBoxVisibility.Collapsible;
        }
Exemplo n.º 3
0
 public SearchViewModel()
 {
     IsLoading    = true;
     IsVisible    = SearchBoxVisibility.Hidden;
     _restService = new RestService();
     RestService.ConectivityStatus();
     LoadPageEvent();
 }
Exemplo n.º 4
0
        protected void AddSearchHandler(string placeholder, SearchBoxVisibility visibility)
        {
            var searchHandler = new CustomSearchHandler();

            searchHandler.ShowsResults = true;

            searchHandler.ClearIconName     = "Clear";
            searchHandler.ClearIconHelpText = "Clears the search field text";

            searchHandler.ClearPlaceholderName     = "Voice Search";
            searchHandler.ClearPlaceholderHelpText = "Start voice search";

            searchHandler.QueryIconName     = "Search";
            searchHandler.QueryIconHelpText = "Press to search app";

            searchHandler.Placeholder         = placeholder;
            searchHandler.SearchBoxVisibility = visibility;

            searchHandler.ClearPlaceholderEnabled = true;
            searchHandler.ClearPlaceholderIcon    = "mic.png";

            Shell.SetSearchHandler(this, searchHandler);
        }