共用方式為


LocalContentSuggestionSettings.PropertiesToMatch 屬性

定義

檔案屬性的清單,其值可用來提供本機檔案的建議。 如果清單是空的,則會使用可供建議使用的所有檔案屬性。

public:
 property IVector<Platform::String ^> ^ PropertiesToMatch { IVector<Platform::String ^> ^ get(); };
IVector<winrt::hstring> PropertiesToMatch();
public IList<string> PropertiesToMatch { get; }
var iVector = localContentSuggestionSettings.propertiesToMatch;
Public ReadOnly Property PropertiesToMatch As IList(Of String)

屬性值

IVector<String>

IList<String>

IVector<Platform::String>

IVector<winrt::hstring>

用來提供本機檔案建議的檔案屬性清單。 根據預設,此清單是空的,而且會使用可供建議使用的所有檔案屬性。

備註

重要

若要在應用程式中實作Windows 10或更新版本的搜尋,請使用AutoSuggestBox。 如需詳細資訊,請參閱 自動建議方塊

您不應該在 app 中使用Windows.ApplicationModel.Search API (SearchPaneSearchContract) 或SearchBox API,以進行Windows 10或更新版本。

如果停用本機建議,則此屬性沒有任何作用。

將屬性新增至此清單會將本機建議限制為本機索引檔案之指定屬性值。 例如,如果您想要限制音樂藝術師的建議,您會將 「System.Music.AlbumArtist」 附加 (相簿) 或 「System.Music.Artist」 (參與藝術師) 屬性至 PropertiesToMatch 清單。

將屬性新增至此清單會將本機建議限制為具有已列出屬性的本機索引檔案。

適用於

另請參閱