SearchSuggestionCollection.AppendResultSuggestion(String, String, String, IRandomAccessStreamReference, String) SearchSuggestionCollection.AppendResultSuggestion(String, String, String, IRandomAccessStreamReference, String) SearchSuggestionCollection.AppendResultSuggestion(String, String, String, IRandomAccessStreamReference, String) SearchSuggestionCollection.AppendResultSuggestion(String, String, String, IRandomAccessStreamReference, String) SearchSuggestionCollection.AppendResultSuggestion(String, String, String, IRandomAccessStreamReference, String) Method

Definition

Appends a suggested search result to the list of suggestions to display in the search pane.

public : void AppendResultSuggestion(Platform::String text, Platform::String detailText, Platform::String tag, IRandomAccessStreamReference image, Platform::String imageAlternateText)
void AppendResultSuggestion(winrt::hstring text, winrt::hstring detailText, winrt::hstring tag, IRandomAccessStreamReference image, winrt::hstring imageAlternateText) const;
public void AppendResultSuggestion(String text, String detailText, String tag, IRandomAccessStreamReference image, String imageAlternateText)
Public Sub AppendResultSuggestion(text As String, detailText As String, tag As String, image As IRandomAccessStreamReference, imageAlternateText As String)
searchSuggestionCollection.appendResultSuggestion(text, detailText, tag, image, imageAlternateText);

Parameters

text
String String String

The text of the suggested result.

detailText
String String String

The detail text for the suggested result.

tag
String String String

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.

image
IRandomAccessStreamReference IRandomAccessStreamReference IRandomAccessStreamReference

The image to accompany the results suggestion. The image should be 40 x 40. Windows will scale or crop smaller or larger images.

imageAlternateText
String String String

The alternate text for the image.

Remarks

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.

See also