Megosztás a következőn keresztül:


SearchPaneSuggestionsRequest.SearchSuggestionCollection Property

Definition

Gets the suggestions to display in the search pane for the current query. Apps provide suggestions to display by appending them to this SearchSuggestionCollection object.

public:
 property SearchSuggestionCollection ^ SearchSuggestionCollection { SearchSuggestionCollection ^ get(); };
/// [get: Windows.Foundation.Metadata.Deprecated("ISearchPaneSuggestionsRequest may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.ApplicationModel.Search.SearchContract)]
SearchSuggestionCollection SearchSuggestionCollection();
/// [get: Windows.Foundation.Metadata.Deprecated("ISearchPaneSuggestionsRequest may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
SearchSuggestionCollection SearchSuggestionCollection();
public SearchSuggestionCollection SearchSuggestionCollection { [Windows.Foundation.Metadata.Deprecated("ISearchPaneSuggestionsRequest may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.ApplicationModel.Search.SearchContract))] get; }
public SearchSuggestionCollection SearchSuggestionCollection { [Windows.Foundation.Metadata.Deprecated("ISearchPaneSuggestionsRequest may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")] get; }
var searchSuggestionCollection = searchPaneSuggestionsRequest.searchSuggestionCollection;
Public ReadOnly Property SearchSuggestionCollection As SearchSuggestionCollection

Property Value

The suggestions to display. Apps provide suggestions by appending them to this SearchSuggestionCollection object.

Attributes

Remarks

Important

To implement search in an app for Windows 10 or later, use AutoSuggestBox. See Auto-suggest box for more info.

You should not use Windows.ApplicationModel.Search APIs (SearchPane, SearchContract) or SearchBox APIs in apps for Windows 10 or later.

The search pane can display 5 suggestions, at most. Additionally, each separator you use takes the place of a suggestion and lowers the number of suggestions that you can display.

Use the SearchSuggestionCollection object to append app-provided suggestions and search separators to display in the search pane.

When the request for suggestions is completed, either by returning from the suggestionsrequested event handler or by calling searchPaneSuggestionsRequestDeferral.complete, the search pane displays the suggestions in the searchSuggestionCollection.

Applies to

See also