CoreTextTextUpdatingEventArgs
CoreTextTextUpdatingEventArgs
CoreTextTextUpdatingEventArgs
CoreTextTextUpdatingEventArgs
Class
Definition
Provides data for the TextUpdating event.
public : sealed class CoreTextTextUpdatingEventArgs : ICoreTextTextUpdatingEventArgspublic sealed class CoreTextTextUpdatingEventArgs : ICoreTextTextUpdatingEventArgsPublic NotInheritable Class CoreTextTextUpdatingEventArgs Implements ICoreTextTextUpdatingEventArgs// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
An object of this type is passed as an argument to a handler for the TextUpdating event.
Properties
InputLanguage InputLanguage InputLanguage InputLanguage
Gets a Language object representing the current input language.
public : Language InputLanguage { get; }public Language InputLanguage { get; }Public ReadOnly Property InputLanguage As Language// You can use this property in JavaScript.
IsCanceled IsCanceled IsCanceled IsCanceled
Gets a value that indicates whether the text update operation is canceled.
public : PlatForm::Boolean IsCanceled { get; }public bool IsCanceled { get; }Public ReadOnly Property IsCanceled As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
true if the text update operation is canceled; otherwise, false.
Examples
// Notify Windows that the deferred operation is beginning
if (!args.IsCanceled)
{
// Perform deferred operation
// …
// Notify Windows that the deferred operation is complete
deferral.Complete();
}
Remarks
If the app defers the operation, it is possible for it to be canceled before the app responds to it. For this reason, you should read this property, only once, immediately before responding to a deferred operation.
Note
The "getter" for the IsCanceled property notifies Windows that the app is beginning the deferred operation. You should consider reading this property as a required step before you perform the deferred operation. Use the pattern shown in the example when reading IsCanceled.
NewSelection NewSelection NewSelection NewSelection
Gets a value that indicates the range of text that the text input server indicates should be selected. The server populates this property before raising the event.
public : CoreTextRange NewSelection { get; }public CoreTextRange NewSelection { get; }Public ReadOnly Property NewSelection As CoreTextRange// You can use this property in JavaScript.
The range of text that the server indicates should be selected.
Range Range Range Range
Gets a value that indicates the range of text that the text input server needs to modify. The server populates this property before raising the event.
public : CoreTextRange Range { get; }public CoreTextRange Range { get; }Public ReadOnly Property Range As CoreTextRange// You can use this property in JavaScript.
The range of text to modify.
Result Result Result Result
Gets or sets a value that indicates the result of handling the TextUpdating event. The default value is Succeeded but if you can't action the operation as the text input server expects then before returning from the event handler set the property to the appropriate value to indicate what has happened.
public : CoreTextTextUpdatingResult Result { get; set; }public CoreTextTextUpdatingResult Result { get; set; }Public ReadWrite Property Result As CoreTextTextUpdatingResult// You can use this property in JavaScript.
- Value
- CoreTextTextUpdatingResult CoreTextTextUpdatingResult CoreTextTextUpdatingResult CoreTextTextUpdatingResult
The result of handling the TextUpdating event. The default is Succeeded.
Text Text Text Text
Gets the text that the text input server is requesting to be set into the modified range. The server populates this property before raising the event.
public : PlatForm::String Text { get; }public string Text { get; }Public ReadOnly Property Text As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The text that the server is requesting to be set into the modified range.
Methods
GetDeferral() GetDeferral() GetDeferral() GetDeferral()
Requests that the text update operation be delayed. Call this method if your text input control is hosted on a worker thread rather than on the UI thread.
public : Deferral GetDeferral()public Deferral GetDeferral()Public Function GetDeferral() As Deferral// You can use this method in JavaScript.