Share via


CoreTextCompositionSegment Class

Definition

Represents a segment in a composition string. See Remarks for an illustration.

public ref class CoreTextCompositionSegment sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class CoreTextCompositionSegment final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class CoreTextCompositionSegment
Public NotInheritable Class CoreTextCompositionSegment
Inheritance
Object Platform::Object IInspectable CoreTextCompositionSegment
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

An object of this type can be obtained from the CoreTextCompositionCompletedEventArgs.CompositionSegments property inside a handler for the CoreTextEditContext.CompositionCompleted event handler.

The following illustration shows the different parts of a composition:

An illustration of the different parts of a composition The entire string is the composition. The sections marked by the gray brackets are segments, or composition segments. The words inside the blue boxes are converted strings (in this case, Kanji). And the words inside red boxes are pre-conversion strings (in this case, the Hiragana that generated the corresponding Kanji).

Properties

PreconversionString

Gets a string that represents the state of the user input after IME-processing but before final conversion.

Range

Gets an object that represents the range that defines this composition segment.

Applies to