InputMethod.SetInputScope(DependencyObject, InputScope) Yöntem

Tanım

Belirtilen bağımlılık nesnesinde InputScope ekli özelliğin değerini ayarlar.

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)

Parametreler

target
DependencyObject

Ekli özelliğin InputScope ayarlanacağı bağımlılık nesnesi.

value
InputScope

InputScope Ekli özellik için InputScope yeni değeri temsil eden bir nesne.

Özel durumlar

Null olduğunda target oluşturulur.

Örnekler

Aşağıdaki örnekte, bir TextBox nesneyle ilişkilendirilmiş öğesini SetInputScope belirlemek için yönteminin InputScope nasıl kullanılacağı gösterilmektedir.

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

Şunlara uygulanır

Ayrıca bkz.