Пример #1
0
        protected void AddSearchHandler(string placeholder, SearchBoxVisiblity visibility)
        {
            var searchHandler = new CustomSearchHandler
            {
                ShowsResults            = true,
                ClearIconName           = "Clear",
                QueryIconName           = "Search",
                Placeholder             = placeholder,
                SearchBoxVisibility     = visibility,
                ClearPlaceholderEnabled = true
            };

            Shell.SetSearchHandler(this, searchHandler);
        }
Пример #2
0
        protected void AddSearchHandler(string placeholder, SearchBoxVisiblity 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);
        }