Udostępnij za pośrednictwem


SearchPane.SetLocalContentSuggestionSettings Method

Definition

Specifies whether suggestions based on local files are automatically displayed in the search pane, and defines the criteria that Windows uses to locate and filter these suggestions.

public:
 virtual void SetLocalContentSuggestionSettings(LocalContentSuggestionSettings ^ settings) = SetLocalContentSuggestionSettings;
/// [Windows.Foundation.Metadata.Deprecated("ISearchPane may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.ApplicationModel.Search.SearchContract)]
void SetLocalContentSuggestionSettings(LocalContentSuggestionSettings const& settings);
/// [Windows.Foundation.Metadata.Deprecated("ISearchPane may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
void SetLocalContentSuggestionSettings(LocalContentSuggestionSettings const& settings);
[Windows.Foundation.Metadata.Deprecated("ISearchPane may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.ApplicationModel.Search.SearchContract))]
public void SetLocalContentSuggestionSettings(LocalContentSuggestionSettings settings);
[Windows.Foundation.Metadata.Deprecated("ISearchPane may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
public void SetLocalContentSuggestionSettings(LocalContentSuggestionSettings settings);
function setLocalContentSuggestionSettings(settings)
Public Sub SetLocalContentSuggestionSettings (settings As LocalContentSuggestionSettings)

Parameters

settings
LocalContentSuggestionSettings

The new settings for local content suggestions.

Attributes

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.

Note

An app can't use both the search box (Windows.UI.Xaml.Controls.SearchBox/WinJS.UI.SearchBox) and the SearchPane. Using both the search box and the search pane in the same app causes the app to throw an exception with this message: "Cannot create instance of type 'Windows.UI.Xaml.Controls.SearchBox.'"

When local content suggestions are enabled, Windows will provide search suggestions from the user's local files as the user enters query text. For example, a picture application can configure local content suggestions so that search suggestions come only from a particular kind of image file that is stored in the user's picture library.

Applies to

See also