Class TextSelection
Represent a selection of text inside paragraph.
Inheritance
System.Object
TextSelection
Implements
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public class TextSelection : IEnumerable
Remarks
The following are the limitations in using the TextSelection class:
Constructors
TextSelection(WParagraph, Int32, Int32)
Initializes a new instance of the TextSelection class.
Declaration
public TextSelection(WParagraph para, int startCharPos, int endCharPos)
Parameters
Type | Name | Description |
---|---|---|
WParagraph | para | The paragraph. |
System.Int32 | startCharPos | The start char position. |
System.Int32 | endCharPos | The end char position. |
Properties
Count
Gets the number of text chunks in the WTextRange collection. Read-only.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The count. |
Item[Int32]
Gets or sets the string at the specified index from the WTextRange collection.
Declaration
public string this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the string to get. |
Property Value
Type | Description |
---|---|
System.String | The string at the specified collection. |
SelectedText
Gets the selected text. Read-only.
Declaration
public string SelectedText { get; }
Property Value
Type | Description |
---|---|
System.String | The string that represents the selected text. |
Methods
GetAsOneRange()
Gets as one range.
Declaration
public WTextRange GetAsOneRange()
Returns
Type |
---|
WTextRange |
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |
GetRanges()
Gets the ranges.
Declaration
public WTextRange[] GetRanges()
Returns
Type |
---|
WTextRange[] |
Implements
System.Collections.IEnumerable