SearchSuggestionsRequest SearchSuggestionsRequest SearchSuggestionsRequest SearchSuggestionsRequest SearchSuggestionsRequest Class

Definition

Stores suggestions and information about the request for suggestions.

public : sealed class SearchSuggestionsRequest : ISearchSuggestionsRequest
struct winrt::Windows::ApplicationModel::Search::SearchSuggestionsRequest : ISearchSuggestionsRequest
public sealed class SearchSuggestionsRequest : ISearchSuggestionsRequest
Public NotInheritable Class SearchSuggestionsRequest Implements ISearchSuggestionsRequest
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
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 IsCanceled

Indicates whether the request for suggestions to display is canceled.

public : Platform::Boolean IsCanceled { get; }
bool IsCanceled();
public bool IsCanceled { get; }
Public ReadOnly Property IsCanceled As bool
var bool = searchSuggestionsRequest.isCanceled;
Value
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 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; }
SearchSuggestionCollection SearchSuggestionCollection();
public SearchSuggestionCollection SearchSuggestionCollection { get; }
Public ReadOnly Property SearchSuggestionCollection As SearchSuggestionCollection
var searchSuggestionCollection = searchSuggestionsRequest.searchSuggestionCollection;
Value
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() GetDeferral()

Gets an object that lets an app respond to a request for suggestions asynchronously.

public : SearchSuggestionsRequestDeferral GetDeferral()
SearchSuggestionsRequestDeferral GetDeferral() const;
public SearchSuggestionsRequestDeferral GetDeferral()
Public Function GetDeferral() As SearchSuggestionsRequestDeferral
var searchSuggestionsRequestDeferral = searchSuggestionsRequest.getDeferral();
Returns

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.