Dela via


SearchPaneSuggestionsRequestedEventArgs Class

Definition

Provides data for a SuggestionsRequested event that is associated with a SearchPane object.

public ref class SearchPaneSuggestionsRequestedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Search.SearchContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("SearchPaneSuggestionsRequestedEventArgs may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.ApplicationModel.Search.SearchContract)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SearchPaneSuggestionsRequestedEventArgs final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Search.SearchContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Deprecated("SearchPaneSuggestionsRequestedEventArgs may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
class SearchPaneSuggestionsRequestedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Search.SearchContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("SearchPaneSuggestionsRequestedEventArgs may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.ApplicationModel.Search.SearchContract))]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class SearchPaneSuggestionsRequestedEventArgs
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Search.SearchContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Deprecated("SearchPaneSuggestionsRequestedEventArgs may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
public sealed class SearchPaneSuggestionsRequestedEventArgs
Public NotInheritable Class SearchPaneSuggestionsRequestedEventArgs
Inheritance
Object Platform::Object IInspectable SearchPaneSuggestionsRequestedEventArgs
Attributes
Implements

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.10240.0)
Xbox One Extensions for the UWP (introduced in 10.0.10586.0)
API contract
Windows.ApplicationModel.Search.SearchContract (introduced in v1.0)

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.

This object is passed to an app's SuggestionsRequested event handler.

Use your app to provide suggestions

There are a few different ways you can get suggestions for your app to provide:

  • From an app-defined, static, local list
  • From a URL that supports suggestions in OpenSearch format
  • From a URL that supports suggestions in XML format After you obtain suggestions, you must append them to the collection of suggestions to display for the user's query. Access this collection with the searchPaneSuggestionsRequest.searchSuggestionCollection property.

Note

If you want to provide result suggestions, you must also listen for and handle the ResultSuggestionChosen event.

Properties

Language

Gets the Internet Engineering Task Force (IETF) language tag (BCP 47 standard) that identifies the language currently associated with the user's text input device.

LinguisticDetails

Gets an object that provides linguistic information about query text that the user is entering through an Input Method Editor (IME).

QueryText

Gets the text that the app should provide suggestions for and that was in the search box when the SuggestionsRequested event occurred.

Request

Gets an object that stores suggestions and information about the request.

Applies to