共用方式為


SearchPaneSuggestionsRequest.GetDeferral 方法

定義

擷取物件,讓應用程式以非同步方式回應建議的要求。

public:
 virtual SearchPaneSuggestionsRequestDeferral ^ GetDeferral() = GetDeferral;
/// [Windows.Foundation.Metadata.Deprecated("ISearchPaneSuggestionsRequest may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.ApplicationModel.Search.SearchContract)]
SearchPaneSuggestionsRequestDeferral GetDeferral();
/// [Windows.Foundation.Metadata.Deprecated("ISearchPaneSuggestionsRequest may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
SearchPaneSuggestionsRequestDeferral GetDeferral();
[Windows.Foundation.Metadata.Deprecated("ISearchPaneSuggestionsRequest may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.ApplicationModel.Search.SearchContract))]
public SearchPaneSuggestionsRequestDeferral GetDeferral();
[Windows.Foundation.Metadata.Deprecated("ISearchPaneSuggestionsRequest may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
public SearchPaneSuggestionsRequestDeferral GetDeferral();
function getDeferral()
Public Function GetDeferral () As SearchPaneSuggestionsRequestDeferral

傳回

物件,可讓應用程式在滿足搜尋建議的要求時發出訊號。

屬性

備註

重要

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

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

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

使用 searchPaneSuggestionsRequestDeferral.complete 方法,在您的應用程式完成要求時發出訊號。

適用於

另請參閱