CoreTextFormatUpdatingEventArgs CoreTextFormatUpdatingEventArgs CoreTextFormatUpdatingEventArgs CoreTextFormatUpdatingEventArgs Class

Definition

Provides data for the FormatUpdating event.

public : sealed class CoreTextFormatUpdatingEventArgs : ICoreTextFormatUpdatingEventArgspublic sealed class CoreTextFormatUpdatingEventArgs : ICoreTextFormatUpdatingEventArgsPublic NotInheritable Class CoreTextFormatUpdatingEventArgs Implements ICoreTextFormatUpdatingEventArgs// You can use this class in JavaScript.
Attributes
Windows 10 requirements
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 FormatUpdating event.

Properties

BackgroundColor BackgroundColor BackgroundColor BackgroundColor

Gets a value that represents the background color to be applied to the text range. The text input server populates this property before raising the event.

public : IReference<UIElementType> BackgroundColor { get; }public Nullable<UIElementType> BackgroundColor { get; }Public ReadOnly Property BackgroundColor As Nullable<UIElementType>// You can use this property in JavaScript.
Value
IReference<UIElementType> Nullable<UIElementType> Nullable<UIElementType> Nullable<UIElementType>

A value that represents the background color to be applied to the text range.

IsCanceled IsCanceled IsCanceled IsCanceled

Gets a value that indicates whether the format 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 format 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.

Range Range Range Range

Gets a value that indicates the range of text that the text input server needs to format. 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.
Value
CoreTextRange CoreTextRange CoreTextRange CoreTextRange

The range of text to format.

Reason Reason Reason Reason

Gets a value that indicates the reason that the text input server needs to apply formatting to this range of text. The server populates this property before raising the event.

public : CoreTextFormatUpdatingReason Reason { get; }public CoreTextFormatUpdatingReason Reason { get; }Public ReadOnly Property Reason As CoreTextFormatUpdatingReason// You can use this property in JavaScript.
Value
CoreTextFormatUpdatingReason CoreTextFormatUpdatingReason CoreTextFormatUpdatingReason CoreTextFormatUpdatingReason

A value that indicates the reason that the server needs to apply formatting to this range of text.

Result Result Result Result

Gets or sets a value that indicates the result of handling the FormatUpdating 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 : CoreTextFormatUpdatingResult Result { get; set; }public CoreTextFormatUpdatingResult Result { get; set; }Public ReadWrite Property Result As CoreTextFormatUpdatingResult// You can use this property in JavaScript.

TextColor TextColor TextColor TextColor

Gets a value that represents the text color to be applied to the text range. The text input server populates this property before raising the event.

public : IReference<UIElementType> TextColor { get; }public Nullable<UIElementType> TextColor { get; }Public ReadOnly Property TextColor As Nullable<UIElementType>// You can use this property in JavaScript.
Value
IReference<UIElementType> Nullable<UIElementType> Nullable<UIElementType> Nullable<UIElementType>

A value that represents the text color to be applied to the text range.

UnderlineColor UnderlineColor UnderlineColor UnderlineColor

Gets a value that represents the underline color to be applied to the text range. The text input server populates this property before raising the event.

public : IReference<UIElementType> UnderlineColor { get; }public Nullable<UIElementType> UnderlineColor { get; }Public ReadOnly Property UnderlineColor As Nullable<UIElementType>// You can use this property in JavaScript.
Value
IReference<UIElementType> Nullable<UIElementType> Nullable<UIElementType> Nullable<UIElementType>

A value that represents the underline color to be applied to the text range.

UnderlineType UnderlineType UnderlineType UnderlineType

Gets a value that represents the underline type to be applied to the text range. The text input server populates this property before raising the event.

public : IReference<UnderlineType> UnderlineType { get; }public Nullable<UnderlineType> UnderlineType { get; }Public ReadOnly Property UnderlineType As Nullable<UnderlineType>// You can use this property in JavaScript.
Value
IReference<UnderlineType> Nullable<UnderlineType> Nullable<UnderlineType> Nullable<UnderlineType>

A value that represents the underline type to be applied to the text range.

Methods

GetDeferral() GetDeferral() GetDeferral() GetDeferral()

Requests that the format 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.
Returns