SearchPaneSuggestionsRequest 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
儲存建議要求的相關建議和資訊。
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
- 繼承
- 屬性
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或更新版本。
如果您的應用程式提供自己的建議來顯示在搜尋窗格中,請使用 SearchPaneSuggestionsRequest.SearchSuggestionCollection 屬性,將應用程式的建議新增至要顯示的建議集合。
搜尋窗格最多可以顯示 5 個建議。 此外,您使用的每個分隔符號都會取代建議,並降低您可以顯示的建議數目。
屬性
IsCanceled |
指出是否取消顯示建議的要求。 |
SearchSuggestionCollection |
取得在目前查詢的搜尋窗格中顯示的建議。 應用程式會藉由將建議附加至此 SearchSuggestionCollection 物件來提供顯示建議。 |
方法
GetDeferral() |
擷取物件,讓應用程式以非同步方式回應建議的要求。 |