InputMethod.SetInputScope(DependencyObject, InputScope) InputMethod.SetInputScope(DependencyObject, InputScope) InputMethod.SetInputScope(DependencyObject, InputScope) InputMethod.SetInputScope(DependencyObject, InputScope) Method

定義

指定した依存関係オブジェクトの InputScope 添付プロパティの値を設定します。Sets the value of the InputScope attached property on the specified dependency object.

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 DependencyObject DependencyObject DependencyObject

InputScope 添付プロパティの設定対象となる依存関係オブジェクト。The dependency object on which to set the InputScope attached property.

value
InputScope InputScope InputScope InputScope

InputScope 添付プロパティの新しい値を表す InputScope オブジェクト。An InputScope object representing the new value for the InputScope attached property.

例外

targetnull の場合に発生します。Raised when target is null.

次の例は、 SetInputScopeメソッドを使用して、 InputScope TextBoxオブジェクトに関連付けられているを判別する方法を示しています。The following example demonstrates how to use the SetInputScope method to determine the InputScope associated with a TextBox object.

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()

適用対象

こちらもご覧ください