InputMethod 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供可管理 Text Services Framework 並與之互動的功能,Text Services Framework 可支援替代的文字輸入法,如語音輸入和手寫輸入。
public ref class InputMethod : System::Windows::Threading::DispatcherObject
public class InputMethod : System.Windows.Threading.DispatcherObject
type InputMethod = class
inherit DispatcherObject
Public Class InputMethod
Inherits DispatcherObject
- 繼承
下列範例示範如何使用 InputMethod 物件。
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()
Can |
取得值,這個值表示這個輸入法是否可以顯示組態使用者介面 (UI) 。 |
Can |
取得值,這個值表示這個輸入法是否可以顯示字組註冊用戶介面 (UI) 。 |
Current |
取得參考,可參考任何與目前內容關聯的目前作用中輸入法。 |
Dispatcher |
取得與這個 Dispatcher 關聯的 DispatcherObject。 (繼承來源 DispatcherObject) |
Handwriting |
取得或設定這個輸入法之手寫輸入的目前狀態。 |
Ime |
取得或設定與這個輸入法關聯之輸入法編輯器的目前轉換模式。 |
Ime |
取得或設定與這個輸入法關聯之輸入法編輯器的目前句子模式。 |
Ime |
取得或設定與這個輸入法關聯之輸入法編輯器的目前狀態。 |
Microphone |
取得或設定這個輸入法其麥克風輸入的目前狀態。 |
Speech |
取得或設定這個輸入法的語音模式。 |
Input |
取得或設定所指定相依性物件的輸入範圍。 |
Is |
取得或設定值,表示是否啟用這個輸入法。 |
Is |
取得或設定值,這個值表示是否暫止這個輸入法。 |
Preferred |
取得或設定所指定相依性物件的慣用 ImeConversionModeValues 值。 |
Preferred |
取得或設定所指定相依性物件的慣用 ImeSentenceModeValues 值。 |
Preferred |
取得或設定所指定相依性物件的慣用輸入法狀態。 |
State |
發生於輸入法狀態 (由 ImeState 屬性表示) 變更時。 |
產品 | 版本 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |