SearchPaneResultSuggestionChosenEventArgs
SearchPaneResultSuggestionChosenEventArgs
SearchPaneResultSuggestionChosenEventArgs
SearchPaneResultSuggestionChosenEventArgs
Class
Definition
Provides data for a resultsuggestionchosen event that is associated with a searchPane object.
public : sealed class SearchPaneResultSuggestionChosenEventArgs : ISearchPaneResultSuggestionChosenEventArgspublic sealed class SearchPaneResultSuggestionChosenEventArgs : ISearchPaneResultSuggestionChosenEventArgsPublic NotInheritable Class SearchPaneResultSuggestionChosenEventArgs Implements ISearchPaneResultSuggestionChosenEventArgs// You can use this class in JavaScript.
- Attributes
Windows 10 requirements
| Device family |
Windows Desktop Extension SDK (introduced v10.0.10240.0)
Xbox One Extensions for the UWP (introduced v10.0.10586.0)
|
| API contract |
Windows.ApplicationModel.Search.SearchContract (introduced v1)
|
Examples
The Search contract sample demonstrates how to register a resultsuggestionchosen event handler.
Note
You can get information about the event from the searchPaneResultSuggestionChosenEventArgs object that is passed to your resultsuggestionchosen event handler.
searchPane.ResultSuggestionChosen += new TypedEventHandler<SearchPane, SearchPaneResultSuggestionChosenEventArgs>(OnResultSuggestionChosen);
Windows.ApplicationModel.Search.SearchPane.getForCurrentView().onresultsuggestionchosen = function (eventObject) {
WinJS.log && WinJS.log("Result Suggestion Selected with Tag: " + eventObject.tag, "sample", "status");
};
Remarks
This object is passed to an app's resultsuggestionchosen event handler.
Properties
Tag Tag Tag Tag
The tag for the suggested result that the user selected.
public : PlatForm::String Tag { get; }public string Tag { get; }Public ReadOnly Property Tag As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The app-defined tag for the selected search result.
Remarks
The value of this tag is set by the app when it appends the suggested result to a searchSuggestionCollection.
You can use this property to display the view for the result the user selected.
- See Also