共用方式為


InputMethod.Current 屬性

定義

取得參考,可參考任何與目前內容關聯的目前作用中輸入法。

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

屬性值

與目前內容相關聯的對象參考 InputMethod ,如果沒有作用中的輸入法,則為 null

此屬性沒有預設值。

範例

下列範例示範如何使用 Current 屬性。

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

適用於