Bagikan melalui


InputMethod.Current Properti

Definisi

Mendapatkan referensi ke metode input aktif yang saat ini terkait dengan konteks saat ini.

public:
 static property System::Windows::Input::InputMethod ^ Current { System::Windows::Input::InputMethod ^ get(); };
public static System.Windows.Input.InputMethod Current { get; }
static member Current : System.Windows.Input.InputMethod
Public Shared ReadOnly Property Current As InputMethod

Nilai Properti

Referensi ke objek yang InputMethod terkait dengan konteks saat ini, atau null jika tidak ada metode input aktif.

Properti ini tidak memiliki nilai default.

Contoh

Contoh berikut menunjukkan cara menggunakan Current properti .

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

Berlaku untuk