共用方式為


SearchSuggestionManager.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 = searchSuggestionManager.searchHistoryContext;
searchSuggestionManager.searchHistoryContext = string;
Public Property SearchHistoryContext As String

屬性值

String

Platform::String

winrt::hstring

搜尋歷程記錄內容字串。

備註

搜尋歷程記錄內容字串是用來儲存搜尋歷程記錄的次要金鑰。 主鍵是 AppId。 應用程式可以使用搜尋歷程記錄內容字串,根據應用程式的內容來儲存不同的搜尋歷程記錄。

變更 SearchHistoryCoNtext 屬性的值並不會立即更新 Suggestions 屬性中的建議。 呼叫 SetQuery 以更新 Suggestions 屬性。

如果您未設定此屬性,Windows 會假設應用程式中的所有搜尋都發生在相同的內容中。

適用於

另請參閱