LocalContentSuggestionSettings class

Applies to Windows only

Stores settings that determine whether the app provides suggestions based on local files, and that define the criteria used to locate and filter these suggestions.


Public NotInheritable Class LocalContentSuggestionSettings




The LocalContentSuggestionSettings class has these types of members:


The LocalContentSuggestionSettings class has these constructors.

LocalContentSuggestionSettings Creates a new instance of the localContentSuggestionSettings class.



The LocalContentSuggestionSettings class has these properties.

PropertyAccess typeDescription


Read/writeAn Advanced Query Syntax (AQS) string that limits the types and kinds of files that are used to provide suggestions.


Read/writeIndicates whether suggestions based on local files are displayed in the search pane.


Read-onlyA list of the storageFolder objects that contain files that are used to provide suggestions.


Read-onlyA list of the file properties whose values are used to provide suggestions from local files.



The suggestions that the app provides are based on metadata fields and properties on the user's local, indexed files.

If enabled, local suggestions are displayed in the search pane when the user enters a query in the search box.

Disable these suggestions by setting the enabled property to false.

Note  : This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).


The Search contract sample demonstrates how to customize local suggestions by restricting the locations and kinds of files that the suggestions are based on.

Tip  You should add this code to your app's global scope and run it as soon as your app is launched.

No code example is currently available or this language may not be supported.

In the example, suggestions are restricted to one kind of file, music files, using an AQS string. Two of the most common AQS filters restrict based on file kind, like "kind:=.music" in the example; and based on file name extension, like "ext:=.mp3". You can learn more about AQS in Advanced Query Syntax (AQS).


Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported


Windows::ApplicationModel::Search [C++]



See also

Search contract sample
Quickstart: Adding search
Advanced Query Syntax (AQS)
SearchPane class
SearchPane.setLocalContentSuggestionSettings method



© 2014 Microsoft. All rights reserved.