InputMethod 類別

定義

提供可管理 Text Services Framework 並與之互動的功能,Text Services Framework 可支援替代的文字輸入法,如語音輸入和手寫輸入。Provides facilities for managing and interacting with the Text Services Framework, which provides support for alternate text input methods such as speech and handwriting.

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物件。The following example demonstrates how to use an InputMethod object.

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

欄位

InputScopeProperty

識別 InputScope 附加屬性。Identifies the InputScope attached property.

IsInputMethodEnabledProperty

識別 IsInputMethodEnabled 附加屬性。Identifies the IsInputMethodEnabled attached property.

IsInputMethodSuspendedProperty

識別 IsInputMethodSuspended 附加屬性。Identifies the IsInputMethodSuspended attached property.

PreferredImeConversionModeProperty

識別 PreferredImeConversionMode 附加屬性。Identifies the PreferredImeConversionMode attached property.

PreferredImeSentenceModeProperty

識別 PreferredImeSentenceMode 附加屬性。Identifies the PreferredImeSentenceMode attached property.

PreferredImeStateProperty

識別 PreferredImeState 附加屬性。Identifies the PreferredImeState attached property.

屬性

CanShowConfigurationUI

取得值,這個值指出這個輸入法是否能顯示使用者介面 (UI)user interface (UI) 組態。Gets a value that indicates whether or not this input method can display configuration 使用者介面 (UI)user interface (UI).

CanShowRegisterWordUI

取得值,這個值指出這個輸入法是否顯示字組登錄使用者介面 (UI)user interface (UI)Gets a value that indicates whether this input method can display word registration 使用者介面 (UI)user interface (UI).

Current

取得參考,可參考任何與目前內容關聯的目前作用中輸入法。Gets a reference to any currently active input method associated with the current context.

Dispatcher

取得與這個 Dispatcher 關聯的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(繼承來源 DispatcherObject)
HandwritingState

取得或設定這個輸入法之手寫輸入的目前狀態。Gets or sets the current state of handwriting input for this input method.

ImeConversionMode

取得或設定與這個輸入法關聯之輸入法編輯器的目前轉換模式。Gets or sets the current conversion mode for the input method editor associated with this input method.

ImeSentenceMode

取得或設定與這個輸入法關聯之輸入法編輯器的目前句子模式。Gets or sets the current sentence mode for the input method editor associated with this input method.

ImeState

取得或設定與這個輸入法關聯之輸入法編輯器的目前狀態。Gets or sets the current state of the input method editor associated with this input method.

MicrophoneState

取得或設定這個輸入法其麥克風輸入的目前狀態。Gets or sets the current state of microphone input for this input method.

SpeechMode

取得或設定這個輸入法的語音模式。Gets or sets the speech mode for this input method.

附加屬性

InputScope

取得或設定指定相依性物件的輸入範圍。Gets or sets the input scope for a specified dependency object.

IsInputMethodEnabled

取得或設定值,這個值指定這個輸入法是否啟用。Gets or sets a value that indicates whether this input method is enabled.

IsInputMethodSuspended

取得或設定值,這個值指示這個輸入法是否暫止。Gets or sets a value that indicates whether this input method is suspended.

PreferredImeConversionMode

取得或設定指定相依性物件的慣用 ImeConversionModeValues 值。Gets or sets a preferred ImeConversionModeValues value for a specified dependency object.

PreferredImeSentenceMode

取得或設定指定相依性物件的慣用 ImeSentenceModeValues 值。Gets or sets a preferred ImeSentenceModeValues value for a specified dependency object.

PreferredImeState

取得或設定所指定相依性物件的慣用輸入法狀態。Gets or sets a preferred input method state for a specified dependency object.

方法

CheckAccess()

判斷呼叫的執行是否可以存取這個 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(繼承來源 DispatcherObject)
Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetInputScope(DependencyObject)

傳回所指定相依性物件的 InputScope 附加屬性值。Returns the value of the InputScope attached property for a specified dependency object.

GetIsInputMethodEnabled(DependencyObject)

傳回所指定相依性物件的 IsInputMethodEnabled 附加屬性值。Returns the value of the IsInputMethodEnabled attached property for a specified dependency object.

GetIsInputMethodSuspended(DependencyObject)

傳回所指定相依性物件的 IsInputMethodSuspended 附加屬性值。Returns the value of the IsInputMethodSuspended attached property for a specified dependency object.

GetPreferredImeConversionMode(DependencyObject)

傳回所指定相依性物件的 PreferredImeConversionMode 附加屬性值。Returns the value of the PreferredImeConversionMode attached property for a specified dependency object.

GetPreferredImeSentenceMode(DependencyObject)

傳回所指定相依性物件的 PreferredImeSentenceMode 附加屬性值。Returns the value of the PreferredImeSentenceMode attached property for a specified dependency object.

GetPreferredImeState(DependencyObject)

傳回所指定相依性物件的 PreferredImeState 附加屬性值。Returns the value of the PreferredImeState attached property for a specified dependency object.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
SetInputScope(DependencyObject, InputScope)

設定所指定相依性物件的 InputScope 附加屬性值。Sets the value of the InputScope attached property on the specified dependency object.

SetIsInputMethodEnabled(DependencyObject, Boolean)

設定所指定相依性物件的 IsInputMethodEnabled 附加屬性值。Sets the value of the IsInputMethodEnabled attached property on the specified dependency object.

SetIsInputMethodSuspended(DependencyObject, Boolean)

設定所指定相依性物件的 IsInputMethodSuspended 附加屬性值。Sets the value of the IsInputMethodSuspended attached property on the specified dependency object.

SetPreferredImeConversionMode(DependencyObject, ImeConversionModeValues)

設定所指定相依性物件的 PreferredImeConversionMode 附加屬性值。Sets the value of the PreferredImeConversionMode attached property on the specified dependency object.

SetPreferredImeSentenceMode(DependencyObject, ImeSentenceModeValues)

設定所指定相依性物件的 PreferredImeSentenceMode 附加屬性值。Sets the value of the PreferredImeSentenceMode attached property on the specified dependency object.

SetPreferredImeState(DependencyObject, InputMethodState)

設定所指定相依性物件的 PreferredImeState 附加屬性值。Sets the value of the PreferredImeState attached property on the specified dependency object.

ShowConfigureUI()

顯示與目前使用中之鍵盤文字服務關聯的組態使用者介面 (UI)user interface (UI)Displays configuration 使用者介面 (UI)user interface (UI) associated with the currently active keyboard text service.

ShowConfigureUI(UIElement)

使用指定為使用者介面 (UI)user interface (UI) 組態之父項目的 UIElement,顯示與目前作用中鍵盤文字服務關聯的 UIUI 組態。Displays configuration 使用者介面 (UI)user interface (UI) associated with the currently active keyboard text service, using a specified UIElement as the parent element for the configuration UIUI.

ShowRegisterWordUI()

顯示與目前使用中之鍵盤文字服務關聯的字組登錄使用者介面 (UI)user interface (UI)Displays word registration 使用者介面 (UI)user interface (UI) associated with the currently active keyboard text service.

ShowRegisterWordUI(String)

顯示與目前使用中之鍵盤文字服務關聯的字組登錄使用者介面 (UI)user interface (UI)Displays word registration 使用者介面 (UI)user interface (UI) associated with the currently active keyboard text service. 接受特定字串做為要註冊的預設值。Accepts a specified string as the default value to register.

ShowRegisterWordUI(UIElement, String)

顯示與目前使用中之鍵盤文字服務關聯的字組登錄使用者介面 (UI)user interface (UI)Displays word registration 使用者介面 (UI)user interface (UI) associated with the currently active keyboard text service. 接受特定字串做為要註冊的預設值,並接受特定的 UIElement 做為 UIUI 組態的父項目。Accepts a specified string as the default value to register, and a specified UIElement as the parent element for the configuration UIUI.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
VerifyAccess()

請強制執行可以存取這個 DispatcherObject 的呼叫執行緒。Enforces that the calling thread has access to this DispatcherObject.

(繼承來源 DispatcherObject)

事件

StateChanged

發生於輸入法狀態 (由 ImeState 屬性表示) 變更時。Occurs when the input method state (represented by the ImeState property) changes.

適用於

另請參閱