SearchSuggestionManager.SearchHistoryContext 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
識別搜尋的內容,並用來儲存使用者的搜尋歷程記錄與應用程式。
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
屬性值
搜尋歷程記錄內容字串。
備註
搜尋歷程記錄內容字串是用來儲存搜尋歷程記錄的次要金鑰。 主鍵是 AppId。 應用程式可以使用搜尋歷程記錄內容字串,根據應用程式的內容來儲存不同的搜尋歷程記錄。
變更 SearchHistoryCoNtext 屬性的值並不會立即更新 Suggestions 屬性中的建議。 呼叫 SetQuery 以更新 Suggestions 屬性。
如果您未設定此屬性,Windows 會假設應用程式中的所有搜尋都發生在相同的內容中。