Share via


SearchBox.SearchHistoryContext プロパティ

定義

検索のコンテキストを識別し、アプリでユーザーの検索履歴を格納するために使用される文字列を取得または設定します。

public:
 property Platform::String ^ SearchHistoryContext { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring SearchHistoryContext();

void SearchHistoryContext(winrt::hstring value);
public string SearchHistoryContext { get; set; }
var string = searchBox.searchHistoryContext;
searchBox.searchHistoryContext = string;
Public Property SearchHistoryContext As String
<SearchBox SearchHistoryContext="string"/>

プロパティ値

String

Platform::String

winrt::hstring

検索のコンテキストを識別する文字列。 既定値は、空の文字列 ("") です。

注釈

検索履歴コンテキスト文字列は、検索履歴を格納するためのセカンダリ キーとして使用されます。 主キーは AppId です。 検索履歴コンテキスト文字列を使用すると、アプリ内のページや検索エントリ ポイントごとに異なる検索履歴を格納できます。 このプロパティを設定しない場合、Windows では、アプリ内のすべての検索が同じコンテキストで行われると想定されます。

適用対象