SearchSuggestionCollection.AppendResultSuggestion | appendResultSuggestion method
Appends a suggested search result to the list of suggestions to display in the search pane.
searchSuggestionCollection.appendResultSuggestion(text, detailText, tag, image, imageAlternateText);
The text of the suggested result.
The detail text for the suggested result.
The unique tag that identifies this suggested result.
If this suggested result is selected by the user, a resultsuggestionchosen event is fired. When the app handles this event, it can get the tag of the chosen result suggestion from the searchPaneResultSuggestionChosenEventArgs.tag property.
The image to accompany the results suggestion.
The image should be 40 x 40. Windows will scale or crop smaller or larger images.
The alternate text for the image.
You should use result suggestions instead of query suggestions only to display high-confidence results that take the user directly to the item instead of to a view that shows search results.
Suggested results include an image and optional detail text to display with the suggestion in the search pane. The image signals to the user that they are seeing results and not query suggestions. If an image for the result doesn't exist, you can use a generic image or icon that represents the result or result type.
You must listen for and handle the resultsuggestionchosen event if you want to provide result suggestions.
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. Learn more about displaying suggestions in Guidelines and checklist for search.
Minimum supported client
Minimum supported server
|Windows Server 2012|
Minimum supported phone
- Search contract sample
- Guidelines and checklist for search
- SearchSuggestionCollection class
- SearchPane.SuggestionsRequested event
- SearchPane.ResultSuggestionChosen event
- SearchPaneSuggestionsRequestedEventArgs class
- SearchPaneSuggestionsRequestedEventArgs.Request property
- SearchPaneSuggestionsRequest class
- SearchPaneSuggestionsRequest.SearchSuggestionCollection property