InputMethod.SetInputScope(DependencyObject, InputScope) Methode

Definition

Legt den Wert der InputScope angefügten Eigenschaft für das angegebene Abhängigkeitsobjekt fest.

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)

Parameter

target
DependencyObject

Das Abhängigkeitsobjekt, von dem die InputScope angefügte Eigenschaft festgelegt werden soll.

value
InputScope

Ein InputScope Objekt, das den neuen Wert für die InputScope angefügte Eigenschaft darstellt.

Ausnahmen

Wird ausgelöst, wenn targetnull ist.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie die SetInputScope Methode verwendet wird, um das InputScope zugeordnete TextBox Objekt zu bestimmen.

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

Gilt für:

Weitere Informationen