InputMethod.SetInputScope(DependencyObject, InputScope) Metódus

Definíció

Beállítja a InputScope csatolt tulajdonság értékét a megadott függőségi objektumon.

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)

Paraméterek

target
DependencyObject

Az a függőségi objektum, amelyre a InputScope csatolt tulajdonságot be szeretné állítani.

value
InputScope

A InputScope csatolt tulajdonság új értékét InputScope képviselő objektum.

Kivételek

Null target emelve.

Példák

Az alábbi példa bemutatja, hogyan használható a metódus az SetInputScope objektumhoz InputScope társítottak meghatározásáraTextBox.

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

A következőre érvényes:

Lásd még