Jaa


LocalContentSuggestionSettings.Locations Property

Definition

A list of the StorageFolder objects that contain files that are used to provide suggestions. If the list is empty, suggestions are provided from files in all of the local libraries for which the app declared capabilities.

public:
 property IVector<StorageFolder ^> ^ Locations { IVector<StorageFolder ^> ^ get(); };
IVector<StorageFolder> Locations();
public IList<StorageFolder> Locations { get; }
var iVector = localContentSuggestionSettings.locations;
Public ReadOnly Property Locations As IList(Of StorageFolder)

Property Value

The list of StorageFolder locations that contain files that are used to provide suggestions. By default, this list is empty and suggestions are provided from the local files in all of the libraries for which the app declared capabilities.

Remarks

Important

To implement search in an app for Windows 10 or later, use AutoSuggestBox. See Auto-suggest box for more info.

You should not use Windows.ApplicationModel.Search APIs (SearchPane, SearchContract) or SearchBox APIs in apps for Windows 10 or later.

If you add a location to the list, make sure you add all of the locations that contain files that you want used to provide local suggestions. If a location in this list is not valid, no suggestions are provided from that location. The remaining (valid) locations in this list are then used to provide suggestions.

Suggestions are provided based on local, indexed files in a listed StorageFolder.

If local suggestions are disabled, this property has no effect. Set the LocalContentSuggestionSettings.Enabled property to true to display local suggestions in the search pane.

You can use this list to provide suggestions from libraries or folders for which your app hasn't declared capabilities, like folders that were accessed using the file picker. Learn more about capabilities in App capability declarations.

Applies to

See also