SearchSuggestionsRequest
SearchSuggestionsRequest
SearchSuggestionsRequest
SearchSuggestionsRequest
Class
Definition
Stores suggestions and information about the request for suggestions.
public : sealed class SearchSuggestionsRequest : ISearchSuggestionsRequestpublic sealed class SearchSuggestionsRequest : ISearchSuggestionsRequestPublic NotInheritable Class SearchSuggestionsRequest Implements ISearchSuggestionsRequest// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
If your app provides its own suggestions to display in the search pane or in-app search box, use the SearchSuggestionCollection property to add your app's suggestions to the collection of suggestions to display.
Properties
IsCanceled IsCanceled IsCanceled IsCanceled
Indicates whether the request for suggestions to display is canceled.
public : PlatForm::Boolean IsCanceled { get; }public bool IsCanceled { get; }Public ReadOnly Property IsCanceled As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the request was canceled, otherwise false. The default value is false.
Remarks
A request for search pane or in-app search box suggestions is valid if it's still tied to the most recent SuggestionsRequested event, which means that the user hasn't changed the search query.
SearchSuggestionCollection SearchSuggestionCollection SearchSuggestionCollection SearchSuggestionCollection
The suggestions to display in the search pane or in-app search box for the current query. Apps provide suggestions to display by appending them to this SearchSuggestionCollection object.
public : SearchSuggestionCollection SearchSuggestionCollection { get; }public SearchSuggestionCollection SearchSuggestionCollection { get; }Public ReadOnly Property SearchSuggestionCollection As SearchSuggestionCollection// You can use this property in JavaScript.
- Value
- SearchSuggestionCollection SearchSuggestionCollection SearchSuggestionCollection SearchSuggestionCollection
The suggestions to display. Apps provide suggestions by appending them to this SearchSuggestionCollection object.
Remarks
Use the SearchSuggestionCollection object to append app-provided suggestions and search separators to display in the search pane or in-app search box.
When the request for suggestions is completed, either by returning from the SuggestionsRequested event handler or by calling Complete, the search pane or in-app search box displays the suggestions in the SearchSuggestionCollection.
Methods
GetDeferral() GetDeferral() GetDeferral() GetDeferral()
Gets an object that lets an app respond to a request for suggestions asynchronously.
public : SearchSuggestionsRequestDeferral GetDeferral()public SearchSuggestionsRequestDeferral GetDeferral()Public Function GetDeferral() As SearchSuggestionsRequestDeferral// You can use this method in JavaScript.
An object that lets an app signal when it has fulfilled the request for search suggestions.
Remarks
Your app should respond asynchronously to a request for search suggestions if fulfilling the request will take a significant amount of time, such as fetching suggestions from a web service.
Call the Complete method to signal when your app has fulfilled the request.