SearchPaneSuggestionsRequestedEventArgs.QueryText 属性

定义

获取应用应为其提供建议的文本,以及当 SuggestionsRequested 事件发生时在搜索框中的文本。

public:
 property Platform::String ^ QueryText { Platform::String ^ get(); };
/// [get: Windows.Foundation.Metadata.Deprecated("ISearchPaneQueryChangedEventArgs may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.ApplicationModel.Search.SearchContract)]
winrt::hstring QueryText();
/// [get: Windows.Foundation.Metadata.Deprecated("ISearchPaneQueryChangedEventArgs may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
winrt::hstring QueryText();
public string QueryText { [Windows.Foundation.Metadata.Deprecated("ISearchPaneQueryChangedEventArgs may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.ApplicationModel.Search.SearchContract))] get; }
public string QueryText { [Windows.Foundation.Metadata.Deprecated("ISearchPaneQueryChangedEventArgs may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")] get; }
var string = searchPaneSuggestionsRequestedEventArgs.queryText;
Public ReadOnly Property QueryText As String

属性值

String

Platform::String

winrt::hstring

应用应为其提供建议的查询文本。

实现

属性

注解

重要

若要在应用中实现Windows 10或更高版本的搜索,请使用 AutoSuggestBox。 有关详细信息 ,请参阅自动建议框

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

通常,这是搜索框中的当前文本,但如果用户快速键入或应用处理缓慢,则可能不会。

适用于

另请参阅