Share via


SearchSuggestionsRequestDeferral 類別

定義

可讓應用程式在處理SuggestionsRequested事件時完成填入SearchSuggestionCollection物件時發出訊號。 只有在您的應用程式需要以非同步方式回應建議的要求時,才使用延遲。

public ref class SearchSuggestionsRequestDeferral sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SearchSuggestionsRequestDeferral final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class SearchSuggestionsRequestDeferral
Public NotInheritable Class SearchSuggestionsRequestDeferral
繼承
Object Platform::Object IInspectable SearchSuggestionsRequestDeferral
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

重要

若要在應用程式中實作Windows 10或更新版本的搜尋,請使用AutoSuggestBox。 如需詳細資訊,請參閱 自動建議方塊

您不應該在 app 中使用Windows.ApplicationModel.Search API (SearchPaneSearchContract) 或SearchBox API,以進行Windows 10或更新版本。

如果滿足要求,您的應用程式應該以非同步方式回應建議要求,需要大量時間,例如從 Web 服務擷取建議。

使用 Complete 方法,在您的應用程式完成要求時發出訊號。 在處理SuggestionsRequested事件時呼叫GetDeferral方法來擷取此物件。

方法

Complete()

表示應用程式在處理SuggestionsRequested事件時已完成填入SearchSuggestionCollection物件。

適用於