CoreTextCompositionSegment
CoreTextCompositionSegment
CoreTextCompositionSegment
CoreTextCompositionSegment
Class
Definition
Represents a segment in a composition string. See Remarks for an illustration.
public : sealed class CoreTextCompositionSegment : ICoreTextCompositionSegmentpublic sealed class CoreTextCompositionSegment : ICoreTextCompositionSegmentPublic NotInheritable Class CoreTextCompositionSegment Implements ICoreTextCompositionSegment// 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 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:
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 PreconversionString PreconversionString PreconversionString
Gets a string that represents the state of the user input after IME-processing but before final conversion.
public : PlatForm::String PreconversionString { get; }public string PreconversionString { get; }Public ReadOnly Property PreconversionString As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A string that represents the pre-conversion string.
Remarks
The original string is the text input by the user, for example a romanized string. The IME might process that string into Hiragana, for example, and the result is the pre-conversion string— also known as the reading string. After this, the user might convert part of the Hiragana into Kanji, and the result is the post-conversion string that you would see in the text input control when composition is completed. The pre-conversion string is sometimes phonetic, but not always. For example with some Chinese IMEs it can be the strokes used or, in math, the shortcut used to describe the desired notation. See CoreTextCompositionSegment for an illustration.
Range Range Range Range
Gets an object that represents the range that defines this composition segment.
public : CoreTextRange Range { get; }public CoreTextRange Range { get; }Public ReadOnly Property Range As CoreTextRange// You can use this property in JavaScript.
An object that represents the range that defines this composition segment.