Udostępnij za pośrednictwem


SearchPaneSuggestionsRequest Class

Definition

Stores suggestions and information about the request for suggestions.

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

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.

If your app provides its own suggestions to display in the search pane, use the SearchPaneSuggestionsRequest.SearchSuggestionCollection property to add your app's suggestions to the collection of suggestions to display.

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.

Properties

IsCanceled

Indicates whether the request for suggestions to display is canceled.

SearchSuggestionCollection

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.

Methods

GetDeferral()

Retrieves an object that lets an app respond to a request for suggestions asynchronously.

Applies to

See also