InputMethod.SetInputScope(DependencyObject, InputScope) メソッド

定義

指定した依存関係オブジェクトの InputScope 添付プロパティの値を設定します。

public:
 static void SetInputScope(System::Windows::DependencyObject ^ target, System::Windows::Input::InputScope ^ value);
public static void SetInputScope (System.Windows.DependencyObject target, System.Windows.Input.InputScope value);
static member SetInputScope : System.Windows.DependencyObject * System.Windows.Input.InputScope -> unit
Public Shared Sub SetInputScope (target As DependencyObject, value As InputScope)

パラメーター

target
DependencyObject

InputScope 添付プロパティを設定する依存関係オブジェクト。

value
InputScope

InputScope 添付プロパティの新しい値を表す InputScope オブジェクト。

例外

targetnull の場合に発生します。

次の例では、 メソッドを使用 SetInputScope して、 オブジェクトに関連付けられている を InputScope 確認する方法を TextBox 示します。

InputMethod.SetPreferredImeState(myTextBox, InputMethodState.On);
InputMethod.Current.ImeSentenceMode = ImeSentenceModeValues.Automatic;
InputMethod.Current.HandwritingState = InputMethodState.On;
InputMethod.Current.SpeechMode = SpeechMode.Dictation;
InputScope myInputScope = new InputScope();
myInputScope.RegularExpression = "W|P|F";
InputMethod.SetInputScope(myTextBox, myInputScope);
tb6.Text = "Configuration UI Available?: " + InputMethod.Current.CanShowConfigurationUI.ToString();
InputMethod.SetPreferredImeState(myTextBox, InputMethodState.On)
InputMethod.Current.ImeSentenceMode = ImeSentenceModeValues.Automatic
InputMethod.Current.HandwritingState = InputMethodState.On
InputMethod.Current.SpeechMode = SpeechMode.Dictation
Dim myInputScope As New InputScope()
myInputScope.RegularExpression = "W|P|F"
InputMethod.SetInputScope(myTextBox, myInputScope)
tb6.Text = "Configuration UI Available?: " & InputMethod.Current.CanShowConfigurationUI.ToString()

適用対象

こちらもご覧ください