InputMethod.SetInputScope(DependencyObject, InputScope) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee stelt u de waarde van de InputScope gekoppelde eigenschap in voor het opgegeven afhankelijkheidsobject.
public:
static void SetInputScope(System::Windows::DependencyObject ^ target, System::Windows::Input::InputScope ^ value);
public static void SetInputScope(System.Windows.DependencyObject target, System.Windows.Input.InputScope value);
static member SetInputScope : System.Windows.DependencyObject * System.Windows.Input.InputScope -> unit
Public Shared Sub SetInputScope (target As DependencyObject, value As InputScope)
Parameters
- target
- DependencyObject
Het afhankelijkheidsobject waarop de InputScope gekoppelde eigenschap moet worden ingesteld.
- value
- InputScope
Een InputScope object dat de nieuwe waarde voor de InputScope gekoppelde eigenschap vertegenwoordigt.
Uitzonderingen
Verhoogd wanneer targetnull is.
Voorbeelden
In het volgende voorbeeld ziet u hoe u de methode gebruikt om de SetInputScopeInputScope gekoppelde aan een TextBox object te bepalen.
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()