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。 有关详细信息 ,请参阅自动建议框

不应在适用于 Windows 10 或更高版本的应用中使用 Windows.ApplicationModel.Search API (SearchPaneSearchContract) 或 SearchBox API。

搜索窗格最多可以显示 5 条建议。 此外,使用的每个分隔符将取代建议,并降低可以显示的建议数。

使用 SearchSuggestionCollection 对象追加应用提供的建议和搜索分隔符,以在搜索窗格中显示。

完成建议请求后,无论是通过从 suggestionsrequested 事件处理程序返回,还是通过调用 searchPaneSuggestionsRequestDeferral.complete,搜索窗格将在 searchSuggestionCollection 中显示建议。

适用于

另请参阅