SearchPane.GetForCurrentView メソッド

定義

ユーザーがアプリ内で検索できる検索ウィンドウのインスタンスを取得します。

public:
 static SearchPane ^ GetForCurrentView();
/// [Windows.Foundation.Metadata.Deprecated("ISearchPaneStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.ApplicationModel.Search.SearchContract)]
 static SearchPane GetForCurrentView();
/// [Windows.Foundation.Metadata.Deprecated("ISearchPaneStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
 static SearchPane GetForCurrentView();
[Windows.Foundation.Metadata.Deprecated("ISearchPaneStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.ApplicationModel.Search.SearchContract))]
public static SearchPane GetForCurrentView();
[Windows.Foundation.Metadata.Deprecated("ISearchPaneStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.ApplicationModel.Search.SearchContract")]
public static SearchPane GetForCurrentView();
function getForCurrentView()
Public Shared Function GetForCurrentView () As SearchPane

戻り値

検索ウィンドウのインスタンス。一貫性のあるタッチフレンドリな検索ボックスと、現在のアプリケーション内で検索するためのオプションの検索候補が提供されます。

属性

注釈

重要

Windows 10以降の検索をアプリに実装するには、AutoSuggestBox を使用します。 詳細については、「 自動提案ボックス 」を参照してください。

Windows 10 以降のアプリでは、Windows.ApplicationModel.Search API (SearchPaneSearchContract) または SearchBox API を使用しないでください。

Note

アプリでは、検索ボックス (Windows.UI.Xaml.Controls.SearchBox/WinJS.UI.SearchBox) と SearchPane の両方を使用することはできません。 同じアプリで検索ボックスと検索ウィンドウの両方を使用すると、"型 'Windows.UI.Xaml.Controls.SearchBox.' のインスタンスを作成できません"というメッセージでアプリが例外をスローします。

適用対象

こちらもご覧ください