AppTaskContent.SetTextInput(String, String) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ユーザーが自由形式のテキスト応答を提供するためのテキスト入力フィールドを設定します。
public:
virtual void SetTextInput(Platform::String ^ placeholderText, Platform::String ^ actionUriTemplate) = SetTextInput;
/// [Windows.Foundation.Metadata.Experimental]
void SetTextInput(winrt::hstring const& placeholderText, winrt::hstring const& actionUriTemplate);
[Windows.Foundation.Metadata.Experimental]
public void SetTextInput(string placeholderText, string actionUriTemplate);
function setTextInput(placeholderText, actionUriTemplate)
Public Sub SetTextInput (placeholderText As String, actionUriTemplate As String)
パラメーター
- placeholderText
-
String
Platform::String
winrt::hstring
ユーザーをガイドするために入力フィールドに表示されるプレースホルダー テキスト。
- actionUriTemplate
-
String
Platform::String
winrt::hstring
送信時にユーザーのエスケープされた入力テキストに置き換えられる {userTextInput} を含む URI テンプレート文字列。
- 属性
注釈
Important
アプリ タスクのサポートは、2026 年 5 月から Windows 11 への段階的なロールアウトを開始します。
Windows.UI.Shell.Tasks API によって有効になるエクスペリエンスでは、対応するアプリ タスク機能が、アプリが実行されている Windows のバージョンに存在する必要があります。 それ以外の場合、これらの API は影響を受けなくなります。
このメソッドを使用して、タスクに注意が必要な場合にユーザーからテキスト入力を収集します。 URI テンプレートの {userTextInput} 式は、URL でエンコードされたユーザー入力に置き換えられます。 たとえば、テンプレートが my-app:task/?response={userTextInput} され、ユーザーが "スコープのみ" を入力すると、結果の URI が my-app:task/?response=scope%20onlyされます。