SearchPaneSuggestionsRequestDeferral 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
可讓應用程式在處理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
- 繼承
- 屬性
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。 如需詳細資訊,請參閱 自動建議方塊 。
您不應該在 app 中使用Windows.ApplicationModel.Search API (SearchPane、 SearchContract
) 或SearchBox API,以進行Windows 10或更新版本。
如果滿足要求,您的應用程式應該以非同步方式回應建議要求,需要大量時間,例如從 Web 服務擷取建議。
使用 SearchPaneSuggestionsRequestDeferral.Complete 方法,在您的應用程式完成要求時發出訊號。
應用程式會在處理SuggestionsRequested事件時呼叫SearchPaneSuggestionsRequest.GetDeferral方法來擷取此物件。
方法
Complete() |
表示應用程式在處理SuggestionsRequested事件時已完成填入SearchSuggestionCollection物件。 |
適用於
另請參閱
- SearchPane
- SuggestionsRequested
- SearchPaneSuggestionsRequest
- GetDeferral()
- <xref:Windows.ApplicationModel.Search.SearchPaneSuggestionsRequestedEventArgs%0asuggestionsrequestedeventargs.md)>