共用方式為


SearchPaneSuggestionsRequest.SearchSuggestionCollection 屬性

定義

取得在目前查詢的搜尋窗格中顯示的建議。 應用程式會藉由將應用程式附加至此 SearchSuggestionCollection 物件來提供顯示建議。

public:
 property SearchSuggestionCollection ^ SearchSuggestionCollection { SearchSuggestionCollection ^ get(); };
/// [get: 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)]
SearchSuggestionCollection SearchSuggestionCollection();
/// [get: 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")]
SearchSuggestionCollection SearchSuggestionCollection();
public SearchSuggestionCollection SearchSuggestionCollection { [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))] get; }
public SearchSuggestionCollection SearchSuggestionCollection { [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")] get; }
var searchSuggestionCollection = searchPaneSuggestionsRequest.searchSuggestionCollection;
Public ReadOnly Property SearchSuggestionCollection As SearchSuggestionCollection

屬性值

要顯示的建議。 應用程式會將其附加至此 SearchSuggestionCollection 物件,以提供建議。

屬性

備註

重要

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

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

搜尋窗格最多可以顯示 5 個建議。 此外,您使用的每個分隔符號都會取代建議,並降低您可以顯示的建議數目。

使用 SearchSuggestionCollection 物件來附加應用程式提供的建議和搜尋分隔符號,以顯示在搜尋窗格中。

當建議的要求完成時,請從 suggestionsrequested 事件處理常式傳回或呼叫 searchPaneSuggestionsRequestDeferral.complete,搜尋窗格會在 searchSuggestionCollection中顯示建議。

適用於

另請參閱