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

target olduğunda oluşturulur.

Örnekler

Aşağıdaki örnekte, bir SetInputScope nesneyle ilişkilendirilmiş öğesini InputScope belirlemek için yönteminin TextBox 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.