Dela via


TextSegment Struct

Definition

Identifies a sub-string of a source text string. Your app can use this structure to obtain the segment of your provided text that is identified by AlternateWordForm, SelectableWordSegment, WordSegment, or SemanticTextQuery.

public value class TextSegment
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
struct TextSegment
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public struct TextSegment
var textSegment = {
startPosition : /* Your value */,
length : /* Your value */
}
Public Structure TextSegment
Inheritance
TextSegment
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Length

The number of characters in the associated text segment.

StartPosition

The zero-based index of the start of the associated text segment.

Applies to

See also