SearchPaneSuggestionsRequestDeferral 类

定义

使应用能够在处理 SuggestionsRequested 事件时完成填充 SearchSuggestionCollection 对象时发出信号。 仅当应用需要异步响应建议请求时,才应使用延迟。

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

Windows 要求

设备系列
Windows Desktop Extension SDK (在 10.0.10240.0 中引入)
Xbox One Extensions for the UWP (在 10.0.10586.0 中引入)
API contract
Windows.ApplicationModel.Search.SearchContract (在 v1.0 中引入)

注解

重要

若要在应用中实现Windows 10或更高版本的搜索,请使用 AutoSuggestBox。 有关详细信息 ,请参阅自动建议框

不应在适用于 Windows 10 或更高版本的应用中使用 Windows.ApplicationModel.Search API (SearchPaneSearchContract) 或 SearchBox API。

如果满足请求需要花费大量时间(例如从 Web 服务提取建议),应用应异步响应建议请求。

使用 SearchPaneSuggestionsRequestDeferral.Complete 方法在应用满足请求时发出信号。

应用在处理 SuggestionsRequested 事件时,通过调用 SearchPaneSuggestionsRequest.GetDeferral 方法检索此对象。

方法

Complete()

指示应用在处理 SuggestionsRequested 事件时已完成填充 SearchSuggestionCollection 对象的信号。

适用于

另请参阅