Επεξεργασία

Κοινή χρήση μέσω


InputMethod Class

Definition

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
Inheritance
InputMethod

Examples

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

Fields

InputScopeProperty

Identifies the InputScope attached property.

IsInputMethodEnabledProperty

Identifies the IsInputMethodEnabled attached property.

IsInputMethodSuspendedProperty

Identifies the IsInputMethodSuspended attached property.

PreferredImeConversionModeProperty

Identifies the PreferredImeConversionMode attached property.

PreferredImeSentenceModeProperty

Identifies the PreferredImeSentenceMode attached property.

PreferredImeStateProperty

Identifies the PreferredImeState attached property.

Properties

CanShowConfigurationUI

Gets a value that indicates whether or not this input method can display configuration user interface (UI).

CanShowRegisterWordUI

Gets a value that indicates whether this input method can display word registration user interface (UI).

Current

Gets a reference to any currently active input method associated with the current context.

Dispatcher

Gets the Dispatcher this DispatcherObject is associated with.

(Inherited from 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.

Attached Properties

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

Gets or sets a preferred ImeConversionModeValues value for a specified dependency object.

PreferredImeSentenceMode

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.

Methods

CheckAccess()

Determines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetInputScope(DependencyObject)

Returns the value of the InputScope attached property for a specified dependency object.

GetIsInputMethodEnabled(DependencyObject)

Returns the value of the IsInputMethodEnabled attached property for a specified dependency object.

GetIsInputMethodSuspended(DependencyObject)

Returns the value of the IsInputMethodSuspended attached property for a specified dependency object.

GetPreferredImeConversionMode(DependencyObject)

Returns the value of the PreferredImeConversionMode attached property for a specified dependency object.

GetPreferredImeSentenceMode(DependencyObject)

Returns the value of the PreferredImeSentenceMode attached property for a specified dependency object.

GetPreferredImeState(DependencyObject)

Returns the value of the PreferredImeState attached property for a specified dependency object.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetInputScope(DependencyObject, InputScope)

Sets the value of the InputScope attached property on the specified dependency object.

SetIsInputMethodEnabled(DependencyObject, Boolean)

Sets the value of the IsInputMethodEnabled attached property on the specified dependency object.

SetIsInputMethodSuspended(DependencyObject, Boolean)

Sets the value of the IsInputMethodSuspended attached property on the specified dependency object.

SetPreferredImeConversionMode(DependencyObject, ImeConversionModeValues)

Sets the value of the PreferredImeConversionMode attached property on the specified dependency object.

SetPreferredImeSentenceMode(DependencyObject, ImeSentenceModeValues)

Sets the value of the PreferredImeSentenceMode attached property on the specified dependency object.

SetPreferredImeState(DependencyObject, InputMethodState)

Sets the value of the PreferredImeState attached property on the specified dependency object.

ShowConfigureUI()

Displays configuration user interface (UI) associated with the currently active keyboard text service.

ShowConfigureUI(UIElement)

Displays configuration user interface (UI) associated with the currently active keyboard text service, using a specified UIElement as the parent element for the configuration UI.

ShowRegisterWordUI()

Displays word registration user interface (UI) associated with the currently active keyboard text service.

ShowRegisterWordUI(String)

Displays word registration user interface (UI) associated with the currently active keyboard text service. Accepts a specified string as the default value to register.

ShowRegisterWordUI(UIElement, String)

Displays word registration user interface (UI) associated with the currently active keyboard text service. Accepts a specified string as the default value to register, and a specified UIElement as the parent element for the configuration UI.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)

Events

StateChanged

Occurs when the input method state (represented by the ImeState property) changes.

Applies to

See also